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/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/ScoreTrackPurpose.md b/docs/ScoreTrackPurpose.md
new file mode 100644
index 0000000..f7747e0
--- /dev/null
+++ b/docs/ScoreTrackPurpose.md
@@ -0,0 +1,12 @@
+# ScoreTrackPurpose
+
+The purpose of the 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/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()