flat_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +7 -0
- data/README.md +248 -0
- data/Rakefile +8 -0
- data/docs/AccountApi.md +55 -0
- data/docs/Assignment.md +18 -0
- data/docs/AssignmentCopy.md +8 -0
- data/docs/AssignmentCreation.md +12 -0
- data/docs/AssignmentSubmission.md +19 -0
- data/docs/AssignmentSubmissionUpdate.md +11 -0
- data/docs/ClassApi.md +1051 -0
- data/docs/ClassAttachmentCreation.md +10 -0
- data/docs/ClassCreation.md +9 -0
- data/docs/ClassDetails.md +25 -0
- data/docs/ClassDetailsCanvas.md +9 -0
- data/docs/ClassDetailsClever.md +14 -0
- data/docs/ClassDetailsGoogleClassroom.md +11 -0
- data/docs/ClassDetailsGoogleDrive.md +9 -0
- data/docs/ClassDetailsLti.md +10 -0
- data/docs/ClassRoles.md +7 -0
- data/docs/ClassState.md +7 -0
- data/docs/ClassUpdate.md +9 -0
- data/docs/FlatErrorResponse.md +11 -0
- data/docs/FlatLocales.md +7 -0
- data/docs/GoogleClassroomCoursework.md +10 -0
- data/docs/GoogleClassroomSubmission.md +10 -0
- data/docs/Group.md +14 -0
- data/docs/GroupApi.md +167 -0
- data/docs/GroupDetails.md +14 -0
- data/docs/GroupType.md +7 -0
- data/docs/LicenseMode.md +7 -0
- data/docs/LicenseSources.md +7 -0
- data/docs/LmsName.md +7 -0
- data/docs/LtiCredentials.md +16 -0
- data/docs/LtiCredentialsCreation.md +9 -0
- data/docs/MediaAttachment.md +23 -0
- data/docs/MediaScoreSharingMode.md +7 -0
- data/docs/OrganizationApi.md +538 -0
- data/docs/OrganizationInvitation.md +14 -0
- data/docs/OrganizationInvitationCreation.md +9 -0
- data/docs/OrganizationRoles.md +7 -0
- data/docs/ScoreApi.md +1605 -0
- data/docs/ScoreCollaborator.md +15 -0
- data/docs/ScoreCollaboratorCreation.md +13 -0
- data/docs/ScoreComment.md +22 -0
- data/docs/ScoreCommentContext.md +14 -0
- data/docs/ScoreCommentCreation.md +13 -0
- data/docs/ScoreCommentUpdate.md +11 -0
- data/docs/ScoreCommentsCounts.md +11 -0
- data/docs/ScoreCreation.md +13 -0
- data/docs/ScoreCreationType.md +7 -0
- data/docs/ScoreData.md +7 -0
- data/docs/ScoreDataEncoding.md +7 -0
- data/docs/ScoreDetails.md +36 -0
- data/docs/ScoreFork.md +7 -0
- data/docs/ScoreLicense.md +7 -0
- data/docs/ScoreLikesCounts.md +10 -0
- data/docs/ScoreModification.md +13 -0
- data/docs/ScorePrivacy.md +7 -0
- data/docs/ScoreRevision.md +14 -0
- data/docs/ScoreRevisionCreation.md +11 -0
- data/docs/ScoreRevisionStatistics.md +9 -0
- data/docs/ScoreRights.md +9 -0
- data/docs/ScoreSource.md +8 -0
- data/docs/ScoreSummary.md +13 -0
- data/docs/ScoreTrack.md +19 -0
- data/docs/ScoreTrackCreation.md +12 -0
- data/docs/ScoreTrackPoint.md +10 -0
- data/docs/ScoreTrackState.md +7 -0
- data/docs/ScoreTrackType.md +7 -0
- data/docs/ScoreTrackUpdate.md +11 -0
- data/docs/ScoreViewsCounts.md +10 -0
- data/docs/UserAdminUpdate.md +9 -0
- data/docs/UserApi.md +173 -0
- data/docs/UserBasics.md +13 -0
- data/docs/UserCreation.md +11 -0
- data/docs/UserDetails.md +28 -0
- data/docs/UserDetailsAdmin.md +20 -0
- data/docs/UserDetailsAdminLicense.md +12 -0
- data/docs/UserInstruments.md +7 -0
- data/docs/UserPublic.md +25 -0
- data/docs/UserPublicSummary.md +17 -0
- data/flat_api.gemspec +48 -0
- data/git_push.sh +55 -0
- data/lib/flat_api.rb +117 -0
- data/lib/flat_api/api/account_api.rb +72 -0
- data/lib/flat_api/api/class_api.rb +1148 -0
- data/lib/flat_api/api/group_api.rb +191 -0
- data/lib/flat_api/api/organization_api.rb +599 -0
- data/lib/flat_api/api/score_api.rb +1737 -0
- data/lib/flat_api/api/user_api.rb +194 -0
- data/lib/flat_api/api_client.rb +389 -0
- data/lib/flat_api/api_error.rb +38 -0
- data/lib/flat_api/configuration.rb +209 -0
- data/lib/flat_api/models/assignment.rb +323 -0
- data/lib/flat_api/models/assignment_copy.rb +194 -0
- data/lib/flat_api/models/assignment_creation.rb +230 -0
- data/lib/flat_api/models/assignment_submission.rb +299 -0
- data/lib/flat_api/models/assignment_submission_update.rb +220 -0
- data/lib/flat_api/models/class_attachment_creation.rb +242 -0
- data/lib/flat_api/models/class_creation.rb +239 -0
- data/lib/flat_api/models/class_details.rb +351 -0
- data/lib/flat_api/models/class_details_canvas.rb +199 -0
- data/lib/flat_api/models/class_details_clever.rb +282 -0
- data/lib/flat_api/models/class_details_google_classroom.rb +219 -0
- data/lib/flat_api/models/class_details_google_drive.rb +199 -0
- data/lib/flat_api/models/class_details_lti.rb +209 -0
- data/lib/flat_api/models/class_roles.rb +22 -0
- data/lib/flat_api/models/class_state.rb +23 -0
- data/lib/flat_api/models/class_update.rb +231 -0
- data/lib/flat_api/models/flat_error_response.rb +219 -0
- data/lib/flat_api/models/flat_locales.rb +27 -0
- data/lib/flat_api/models/google_classroom_coursework.rb +209 -0
- data/lib/flat_api/models/google_classroom_submission.rb +209 -0
- data/lib/flat_api/models/group.rb +282 -0
- data/lib/flat_api/models/group_details.rb +248 -0
- data/lib/flat_api/models/group_type.rb +23 -0
- data/lib/flat_api/models/license_mode.rb +22 -0
- data/lib/flat_api/models/license_sources.rb +25 -0
- data/lib/flat_api/models/lms_name.rb +27 -0
- data/lib/flat_api/models/lti_credentials.rb +268 -0
- data/lib/flat_api/models/lti_credentials_creation.rb +227 -0
- data/lib/flat_api/models/media_attachment.rb +371 -0
- data/lib/flat_api/models/media_score_sharing_mode.rb +23 -0
- data/lib/flat_api/models/organization_invitation.rb +248 -0
- data/lib/flat_api/models/organization_invitation_creation.rb +198 -0
- data/lib/flat_api/models/organization_roles.rb +24 -0
- data/lib/flat_api/models/score_collaborator.rb +263 -0
- data/lib/flat_api/models/score_collaborator_creation.rb +245 -0
- data/lib/flat_api/models/score_comment.rb +363 -0
- data/lib/flat_api/models/score_comment_context.rb +282 -0
- data/lib/flat_api/models/score_comment_creation.rb +245 -0
- data/lib/flat_api/models/score_comment_update.rb +268 -0
- data/lib/flat_api/models/score_comments_counts.rb +219 -0
- data/lib/flat_api/models/score_creation.rb +240 -0
- data/lib/flat_api/models/score_creation_type.rb +23 -0
- data/lib/flat_api/models/score_data.rb +179 -0
- data/lib/flat_api/models/score_data_encoding.rb +21 -0
- data/lib/flat_api/models/score_details.rb +467 -0
- data/lib/flat_api/models/score_fork.rb +179 -0
- data/lib/flat_api/models/score_license.rb +28 -0
- data/lib/flat_api/models/score_likes_counts.rb +209 -0
- data/lib/flat_api/models/score_modification.rb +270 -0
- data/lib/flat_api/models/score_privacy.rb +24 -0
- data/lib/flat_api/models/score_revision.rb +249 -0
- data/lib/flat_api/models/score_revision_creation.rb +222 -0
- data/lib/flat_api/models/score_revision_statistics.rb +199 -0
- data/lib/flat_api/models/score_rights.rb +203 -0
- data/lib/flat_api/models/score_source.rb +189 -0
- data/lib/flat_api/models/score_summary.rb +237 -0
- data/lib/flat_api/models/score_track.rb +298 -0
- data/lib/flat_api/models/score_track_creation.rb +229 -0
- data/lib/flat_api/models/score_track_point.rb +252 -0
- data/lib/flat_api/models/score_track_state.rb +23 -0
- data/lib/flat_api/models/score_track_type.rb +24 -0
- data/lib/flat_api/models/score_track_update.rb +219 -0
- data/lib/flat_api/models/score_views_counts.rb +209 -0
- data/lib/flat_api/models/user_admin_update.rb +214 -0
- data/lib/flat_api/models/user_basics.rb +239 -0
- data/lib/flat_api/models/user_creation.rb +266 -0
- data/lib/flat_api/models/user_details.rb +418 -0
- data/lib/flat_api/models/user_details_admin.rb +306 -0
- data/lib/flat_api/models/user_details_admin_license.rb +227 -0
- data/lib/flat_api/models/user_instruments.rb +179 -0
- data/lib/flat_api/models/user_public.rb +356 -0
- data/lib/flat_api/models/user_public_summary.rb +277 -0
- data/lib/flat_api/version.rb +15 -0
- data/lib/swagger_client.rb +117 -0
- data/lib/swagger_client/api/account_api.rb +72 -0
- data/lib/swagger_client/api/class_api.rb +1148 -0
- data/lib/swagger_client/api/group_api.rb +191 -0
- data/lib/swagger_client/api/organization_api.rb +599 -0
- data/lib/swagger_client/api/score_api.rb +1737 -0
- data/lib/swagger_client/api/user_api.rb +194 -0
- data/lib/swagger_client/api_client.rb +389 -0
- data/lib/swagger_client/api_error.rb +38 -0
- data/lib/swagger_client/configuration.rb +209 -0
- data/lib/swagger_client/models/assignment.rb +323 -0
- data/lib/swagger_client/models/assignment_copy.rb +194 -0
- data/lib/swagger_client/models/assignment_creation.rb +230 -0
- data/lib/swagger_client/models/assignment_submission.rb +299 -0
- data/lib/swagger_client/models/assignment_submission_update.rb +220 -0
- data/lib/swagger_client/models/class_attachment_creation.rb +242 -0
- data/lib/swagger_client/models/class_creation.rb +239 -0
- data/lib/swagger_client/models/class_details.rb +351 -0
- data/lib/swagger_client/models/class_details_canvas.rb +199 -0
- data/lib/swagger_client/models/class_details_clever.rb +282 -0
- data/lib/swagger_client/models/class_details_google_classroom.rb +219 -0
- data/lib/swagger_client/models/class_details_google_drive.rb +199 -0
- data/lib/swagger_client/models/class_details_lti.rb +209 -0
- data/lib/swagger_client/models/class_roles.rb +22 -0
- data/lib/swagger_client/models/class_state.rb +23 -0
- data/lib/swagger_client/models/class_update.rb +231 -0
- data/lib/swagger_client/models/flat_error_response.rb +219 -0
- data/lib/swagger_client/models/flat_locales.rb +27 -0
- data/lib/swagger_client/models/google_classroom_coursework.rb +209 -0
- data/lib/swagger_client/models/google_classroom_submission.rb +209 -0
- data/lib/swagger_client/models/group.rb +282 -0
- data/lib/swagger_client/models/group_details.rb +248 -0
- data/lib/swagger_client/models/group_type.rb +23 -0
- data/lib/swagger_client/models/license_mode.rb +22 -0
- data/lib/swagger_client/models/license_sources.rb +25 -0
- data/lib/swagger_client/models/lms_name.rb +27 -0
- data/lib/swagger_client/models/lti_credentials.rb +268 -0
- data/lib/swagger_client/models/lti_credentials_creation.rb +227 -0
- data/lib/swagger_client/models/media_attachment.rb +371 -0
- data/lib/swagger_client/models/media_score_sharing_mode.rb +23 -0
- data/lib/swagger_client/models/organization_invitation.rb +248 -0
- data/lib/swagger_client/models/organization_invitation_creation.rb +198 -0
- data/lib/swagger_client/models/organization_roles.rb +24 -0
- data/lib/swagger_client/models/score_collaborator.rb +263 -0
- data/lib/swagger_client/models/score_collaborator_creation.rb +245 -0
- data/lib/swagger_client/models/score_comment.rb +363 -0
- data/lib/swagger_client/models/score_comment_context.rb +282 -0
- data/lib/swagger_client/models/score_comment_creation.rb +245 -0
- data/lib/swagger_client/models/score_comment_update.rb +268 -0
- data/lib/swagger_client/models/score_comments_counts.rb +219 -0
- data/lib/swagger_client/models/score_creation.rb +240 -0
- data/lib/swagger_client/models/score_creation_type.rb +23 -0
- data/lib/swagger_client/models/score_data.rb +179 -0
- data/lib/swagger_client/models/score_data_encoding.rb +21 -0
- data/lib/swagger_client/models/score_details.rb +467 -0
- data/lib/swagger_client/models/score_fork.rb +179 -0
- data/lib/swagger_client/models/score_license.rb +28 -0
- data/lib/swagger_client/models/score_likes_counts.rb +209 -0
- data/lib/swagger_client/models/score_modification.rb +270 -0
- data/lib/swagger_client/models/score_privacy.rb +24 -0
- data/lib/swagger_client/models/score_revision.rb +249 -0
- data/lib/swagger_client/models/score_revision_creation.rb +222 -0
- data/lib/swagger_client/models/score_revision_statistics.rb +199 -0
- data/lib/swagger_client/models/score_rights.rb +203 -0
- data/lib/swagger_client/models/score_source.rb +189 -0
- data/lib/swagger_client/models/score_summary.rb +237 -0
- data/lib/swagger_client/models/score_track.rb +298 -0
- data/lib/swagger_client/models/score_track_creation.rb +229 -0
- data/lib/swagger_client/models/score_track_point.rb +252 -0
- data/lib/swagger_client/models/score_track_state.rb +23 -0
- data/lib/swagger_client/models/score_track_type.rb +24 -0
- data/lib/swagger_client/models/score_track_update.rb +219 -0
- data/lib/swagger_client/models/score_views_counts.rb +209 -0
- data/lib/swagger_client/models/user_admin_update.rb +214 -0
- data/lib/swagger_client/models/user_basics.rb +239 -0
- data/lib/swagger_client/models/user_creation.rb +266 -0
- data/lib/swagger_client/models/user_details.rb +418 -0
- data/lib/swagger_client/models/user_details_admin.rb +306 -0
- data/lib/swagger_client/models/user_details_admin_license.rb +227 -0
- data/lib/swagger_client/models/user_instruments.rb +179 -0
- data/lib/swagger_client/models/user_public.rb +356 -0
- data/lib/swagger_client/models/user_public_summary.rb +277 -0
- data/lib/swagger_client/version.rb +15 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/class_api_spec.rb +278 -0
- data/spec/api/group_api_spec.rb +72 -0
- data/spec/api/organization_api_spec.rb +162 -0
- data/spec/api/score_api_spec.rb +411 -0
- data/spec/api/user_api_spec.rb +73 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/assignment_copy_spec.rb +42 -0
- data/spec/models/assignment_creation_spec.rb +66 -0
- data/spec/models/assignment_spec.rb +106 -0
- data/spec/models/assignment_submission_spec.rb +108 -0
- data/spec/models/assignment_submission_update_spec.rb +60 -0
- data/spec/models/class_attachment_creation_spec.rb +58 -0
- data/spec/models/class_creation_spec.rb +48 -0
- data/spec/models/class_details_canvas_spec.rb +48 -0
- data/spec/models/class_details_clever_spec.rb +82 -0
- data/spec/models/class_details_google_classroom_spec.rb +60 -0
- data/spec/models/class_details_google_drive_spec.rb +48 -0
- data/spec/models/class_details_lti_spec.rb +54 -0
- data/spec/models/class_details_spec.rb +144 -0
- data/spec/models/class_roles_spec.rb +36 -0
- data/spec/models/class_state_spec.rb +36 -0
- data/spec/models/class_update_spec.rb +48 -0
- data/spec/models/flat_error_response_spec.rb +60 -0
- data/spec/models/flat_locales_spec.rb +36 -0
- data/spec/models/google_classroom_coursework_spec.rb +54 -0
- data/spec/models/google_classroom_submission_spec.rb +54 -0
- data/spec/models/group_details_spec.rb +78 -0
- data/spec/models/group_spec.rb +82 -0
- data/spec/models/group_type_spec.rb +36 -0
- data/spec/models/license_mode_spec.rb +36 -0
- data/spec/models/license_sources_spec.rb +36 -0
- data/spec/models/lms_name_spec.rb +36 -0
- data/spec/models/lti_credentials_creation_spec.rb +48 -0
- data/spec/models/lti_credentials_spec.rb +90 -0
- data/spec/models/media_attachment_spec.rb +136 -0
- data/spec/models/media_score_sharing_mode_spec.rb +36 -0
- data/spec/models/organization_invitation_creation_spec.rb +48 -0
- data/spec/models/organization_invitation_spec.rb +78 -0
- data/spec/models/organization_roles_spec.rb +36 -0
- data/spec/models/score_collaborator_creation_spec.rb +72 -0
- data/spec/models/score_collaborator_spec.rb +84 -0
- data/spec/models/score_comment_context_spec.rb +78 -0
- data/spec/models/score_comment_creation_spec.rb +72 -0
- data/spec/models/score_comment_spec.rb +130 -0
- data/spec/models/score_comment_update_spec.rb +60 -0
- data/spec/models/score_comments_counts_spec.rb +60 -0
- data/spec/models/score_creation_spec.rb +72 -0
- data/spec/models/score_creation_type_spec.rb +36 -0
- data/spec/models/score_data_encoding_spec.rb +36 -0
- data/spec/models/score_data_spec.rb +36 -0
- data/spec/models/score_details_spec.rb +210 -0
- data/spec/models/score_fork_spec.rb +36 -0
- data/spec/models/score_license_spec.rb +36 -0
- data/spec/models/score_likes_counts_spec.rb +54 -0
- data/spec/models/score_modification_spec.rb +72 -0
- data/spec/models/score_privacy_spec.rb +36 -0
- data/spec/models/score_revision_creation_spec.rb +60 -0
- data/spec/models/score_revision_spec.rb +78 -0
- data/spec/models/score_revision_statistics_spec.rb +48 -0
- data/spec/models/score_rights_spec.rb +48 -0
- data/spec/models/score_source_spec.rb +42 -0
- data/spec/models/score_summary_spec.rb +72 -0
- data/spec/models/score_track_creation_spec.rb +66 -0
- data/spec/models/score_track_point_spec.rb +58 -0
- data/spec/models/score_track_spec.rb +108 -0
- data/spec/models/score_track_state_spec.rb +36 -0
- data/spec/models/score_track_type_spec.rb +36 -0
- data/spec/models/score_track_update_spec.rb +60 -0
- data/spec/models/score_views_counts_spec.rb +54 -0
- data/spec/models/user_admin_update_spec.rb +48 -0
- data/spec/models/user_basics_spec.rb +72 -0
- data/spec/models/user_creation_spec.rb +60 -0
- data/spec/models/user_details_admin_license_spec.rb +66 -0
- data/spec/models/user_details_admin_spec.rb +114 -0
- data/spec/models/user_details_spec.rb +166 -0
- data/spec/models/user_instruments_spec.rb +36 -0
- data/spec/models/user_public_spec.rb +144 -0
- data/spec/models/user_public_summary_spec.rb +96 -0
- data/spec/spec_helper.rb +111 -0
- metadata +640 -0
@@ -0,0 +1,191 @@
|
|
1
|
+
=begin
|
2
|
+
#Flat API
|
3
|
+
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.5.0
|
7
|
+
Contact: developers@flat.io
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class GroupApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Get group information
|
24
|
+
#
|
25
|
+
# @param group Unique identifier of a Flat group
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [GroupDetails]
|
28
|
+
def get_group_details(group, opts = {})
|
29
|
+
data, _status_code, _headers = get_group_details_with_http_info(group, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get group information
|
34
|
+
#
|
35
|
+
# @param group Unique identifier of a Flat group
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(GroupDetails, Fixnum, Hash)>] GroupDetails data, response status code and response headers
|
38
|
+
def get_group_details_with_http_info(group, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: GroupApi.get_group_details ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'group' is set
|
43
|
+
if @api_client.config.client_side_validation && group.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.get_group_details"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/groups/{group}".sub('{' + 'group' + '}', group.to_s)
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = ['OAuth2']
|
65
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'GroupDetails')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: GroupApi#get_group_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# List group's scores
|
79
|
+
# Get the list of scores shared with a group.
|
80
|
+
# @param group Unique identifier of a Flat group
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
83
|
+
# @return [Array<ScoreDetails>]
|
84
|
+
def get_group_scores(group, opts = {})
|
85
|
+
data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
|
86
|
+
return data
|
87
|
+
end
|
88
|
+
|
89
|
+
# List group's scores
|
90
|
+
# Get the list of scores shared with a group.
|
91
|
+
# @param group Unique identifier of a Flat group
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @option opts [String] :parent Filter the score forked from the score id `parent`
|
94
|
+
# @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
|
95
|
+
def get_group_scores_with_http_info(group, opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "Calling API: GroupApi.get_group_scores ..."
|
98
|
+
end
|
99
|
+
# verify the required parameter 'group' is set
|
100
|
+
if @api_client.config.client_side_validation && group.nil?
|
101
|
+
fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.get_group_scores"
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s)
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = {}
|
108
|
+
query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
|
109
|
+
|
110
|
+
# header parameters
|
111
|
+
header_params = {}
|
112
|
+
# HTTP header 'Accept' (if needed)
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = ['OAuth2']
|
123
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'Array<ScoreDetails>')
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: GroupApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
|
136
|
+
# List group's users
|
137
|
+
#
|
138
|
+
# @param group Unique identifier of a Flat group
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [Array<UserPublic>]
|
141
|
+
def list_group_users(group, opts = {})
|
142
|
+
data, _status_code, _headers = list_group_users_with_http_info(group, opts)
|
143
|
+
return data
|
144
|
+
end
|
145
|
+
|
146
|
+
# List group's users
|
147
|
+
#
|
148
|
+
# @param group Unique identifier of a Flat group
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [Array<(Array<UserPublic>, Fixnum, Hash)>] Array<UserPublic> data, response status code and response headers
|
151
|
+
def list_group_users_with_http_info(group, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "Calling API: GroupApi.list_group_users ..."
|
154
|
+
end
|
155
|
+
# verify the required parameter 'group' is set
|
156
|
+
if @api_client.config.client_side_validation && group.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.list_group_users"
|
158
|
+
end
|
159
|
+
# resource path
|
160
|
+
local_var_path = "/groups/{group}/users".sub('{' + 'group' + '}', group.to_s)
|
161
|
+
|
162
|
+
# query parameters
|
163
|
+
query_params = {}
|
164
|
+
|
165
|
+
# header parameters
|
166
|
+
header_params = {}
|
167
|
+
# HTTP header 'Accept' (if needed)
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
169
|
+
# HTTP header 'Content-Type'
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
171
|
+
|
172
|
+
# form parameters
|
173
|
+
form_params = {}
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = nil
|
177
|
+
auth_names = ['OAuth2']
|
178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => 'Array<UserPublic>')
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "API called: GroupApi#list_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
|
+
end
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -0,0 +1,599 @@
|
|
1
|
+
=begin
|
2
|
+
#Flat API
|
3
|
+
|
4
|
+
#The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.5.0
|
7
|
+
Contact: developers@flat.io
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class OrganizationApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new couple of LTI 1.x credentials
|
24
|
+
# 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/).
|
25
|
+
# @param body
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [LtiCredentials]
|
28
|
+
def create_lti_credentials(body, opts = {})
|
29
|
+
data, _status_code, _headers = create_lti_credentials_with_http_info(body, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new couple of LTI 1.x credentials
|
34
|
+
# 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/).
|
35
|
+
# @param body
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(LtiCredentials, Fixnum, Hash)>] LtiCredentials data, response status code and response headers
|
38
|
+
def create_lti_credentials_with_http_info(body, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.create_lti_credentials ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'body' is set
|
43
|
+
if @api_client.config.client_side_validation && body.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.create_lti_credentials"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/organizations/lti/credentials"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(body)
|
64
|
+
auth_names = ['OAuth2']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'LtiCredentials')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: OrganizationApi#create_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Create a new invitation to join the organization
|
79
|
+
# 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.
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @option opts [OrganizationInvitationCreation] :body
|
82
|
+
# @return [OrganizationInvitation]
|
83
|
+
def create_organization_invitation(opts = {})
|
84
|
+
data, _status_code, _headers = create_organization_invitation_with_http_info(opts)
|
85
|
+
return data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Create a new invitation to join the organization
|
89
|
+
# 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.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @option opts [OrganizationInvitationCreation] :body
|
92
|
+
# @return [Array<(OrganizationInvitation, Fixnum, Hash)>] OrganizationInvitation data, response status code and response headers
|
93
|
+
def create_organization_invitation_with_http_info(opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_invitation ..."
|
96
|
+
end
|
97
|
+
# resource path
|
98
|
+
local_var_path = "/organizations/invitations"
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = {}
|
102
|
+
|
103
|
+
# header parameters
|
104
|
+
header_params = {}
|
105
|
+
# HTTP header 'Accept' (if needed)
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
107
|
+
# HTTP header 'Content-Type'
|
108
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
109
|
+
|
110
|
+
# form parameters
|
111
|
+
form_params = {}
|
112
|
+
|
113
|
+
# http body (model)
|
114
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
115
|
+
auth_names = ['OAuth2']
|
116
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
117
|
+
:header_params => header_params,
|
118
|
+
:query_params => query_params,
|
119
|
+
:form_params => form_params,
|
120
|
+
:body => post_body,
|
121
|
+
:auth_names => auth_names,
|
122
|
+
:return_type => 'OrganizationInvitation')
|
123
|
+
if @api_client.config.debugging
|
124
|
+
@api_client.config.logger.debug "API called: OrganizationApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
125
|
+
end
|
126
|
+
return data, status_code, headers
|
127
|
+
end
|
128
|
+
|
129
|
+
# Create a new user account
|
130
|
+
#
|
131
|
+
# @param [Hash] opts the optional parameters
|
132
|
+
# @option opts [UserCreation] :body
|
133
|
+
# @return [UserDetailsAdmin]
|
134
|
+
def create_organization_user(opts = {})
|
135
|
+
data, _status_code, _headers = create_organization_user_with_http_info(opts)
|
136
|
+
return data
|
137
|
+
end
|
138
|
+
|
139
|
+
# Create a new user account
|
140
|
+
#
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @option opts [UserCreation] :body
|
143
|
+
# @return [Array<(UserDetailsAdmin, Fixnum, Hash)>] UserDetailsAdmin data, response status code and response headers
|
144
|
+
def create_organization_user_with_http_info(opts = {})
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_user ..."
|
147
|
+
end
|
148
|
+
# resource path
|
149
|
+
local_var_path = "/organizations/users"
|
150
|
+
|
151
|
+
# query parameters
|
152
|
+
query_params = {}
|
153
|
+
|
154
|
+
# header parameters
|
155
|
+
header_params = {}
|
156
|
+
# HTTP header 'Accept' (if needed)
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
158
|
+
# HTTP header 'Content-Type'
|
159
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
160
|
+
|
161
|
+
# form parameters
|
162
|
+
form_params = {}
|
163
|
+
|
164
|
+
# http body (model)
|
165
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
166
|
+
auth_names = ['OAuth2']
|
167
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
168
|
+
:header_params => header_params,
|
169
|
+
:query_params => query_params,
|
170
|
+
:form_params => form_params,
|
171
|
+
:body => post_body,
|
172
|
+
:auth_names => auth_names,
|
173
|
+
:return_type => 'UserDetailsAdmin')
|
174
|
+
if @api_client.config.debugging
|
175
|
+
@api_client.config.logger.debug "API called: OrganizationApi#create_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
176
|
+
end
|
177
|
+
return data, status_code, headers
|
178
|
+
end
|
179
|
+
|
180
|
+
# List LTI 1.x credentials
|
181
|
+
#
|
182
|
+
# @param [Hash] opts the optional parameters
|
183
|
+
# @return [Array<LtiCredentials>]
|
184
|
+
def list_lti_credentials(opts = {})
|
185
|
+
data, _status_code, _headers = list_lti_credentials_with_http_info(opts)
|
186
|
+
return data
|
187
|
+
end
|
188
|
+
|
189
|
+
# List LTI 1.x credentials
|
190
|
+
#
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [Array<(Array<LtiCredentials>, Fixnum, Hash)>] Array<LtiCredentials> data, response status code and response headers
|
193
|
+
def list_lti_credentials_with_http_info(opts = {})
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.list_lti_credentials ..."
|
196
|
+
end
|
197
|
+
# resource path
|
198
|
+
local_var_path = "/organizations/lti/credentials"
|
199
|
+
|
200
|
+
# query parameters
|
201
|
+
query_params = {}
|
202
|
+
|
203
|
+
# header parameters
|
204
|
+
header_params = {}
|
205
|
+
# HTTP header 'Accept' (if needed)
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
+
# HTTP header 'Content-Type'
|
208
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
209
|
+
|
210
|
+
# form parameters
|
211
|
+
form_params = {}
|
212
|
+
|
213
|
+
# http body (model)
|
214
|
+
post_body = nil
|
215
|
+
auth_names = ['OAuth2']
|
216
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
217
|
+
:header_params => header_params,
|
218
|
+
:query_params => query_params,
|
219
|
+
:form_params => form_params,
|
220
|
+
:body => post_body,
|
221
|
+
:auth_names => auth_names,
|
222
|
+
:return_type => 'Array<LtiCredentials>')
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "API called: OrganizationApi#list_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
225
|
+
end
|
226
|
+
return data, status_code, headers
|
227
|
+
end
|
228
|
+
|
229
|
+
# List the organization invitations
|
230
|
+
#
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @option opts [String] :role Filter users by role
|
233
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
234
|
+
# @option opts [String] :_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.
|
235
|
+
# @option opts [String] :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.
|
236
|
+
# @return [Array<OrganizationInvitation>]
|
237
|
+
def list_organization_invitations(opts = {})
|
238
|
+
data, _status_code, _headers = list_organization_invitations_with_http_info(opts)
|
239
|
+
return data
|
240
|
+
end
|
241
|
+
|
242
|
+
# List the organization invitations
|
243
|
+
#
|
244
|
+
# @param [Hash] opts the optional parameters
|
245
|
+
# @option opts [String] :role Filter users by role
|
246
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned
|
247
|
+
# @option opts [String] :_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.
|
248
|
+
# @option opts [String] :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.
|
249
|
+
# @return [Array<(Array<OrganizationInvitation>, Fixnum, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
|
250
|
+
def list_organization_invitations_with_http_info(opts = {})
|
251
|
+
if @api_client.config.debugging
|
252
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_invitations ..."
|
253
|
+
end
|
254
|
+
if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
|
255
|
+
fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
|
256
|
+
end
|
257
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
258
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_invitations, must be smaller than or equal to 1000.'
|
259
|
+
end
|
260
|
+
|
261
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
262
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_invitations, must be greater than or equal to 1.'
|
263
|
+
end
|
264
|
+
|
265
|
+
# resource path
|
266
|
+
local_var_path = "/organizations/invitations"
|
267
|
+
|
268
|
+
# query parameters
|
269
|
+
query_params = {}
|
270
|
+
query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
|
271
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
272
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
273
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
274
|
+
|
275
|
+
# header parameters
|
276
|
+
header_params = {}
|
277
|
+
# HTTP header 'Accept' (if needed)
|
278
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
279
|
+
# HTTP header 'Content-Type'
|
280
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
281
|
+
|
282
|
+
# form parameters
|
283
|
+
form_params = {}
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = nil
|
287
|
+
auth_names = ['OAuth2']
|
288
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => 'Array<OrganizationInvitation>')
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: OrganizationApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
|
301
|
+
# List the organization users
|
302
|
+
#
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @option opts [String] :role Filter users by role
|
305
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
|
306
|
+
# @option opts [String] :_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.
|
307
|
+
# @option opts [String] :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.
|
308
|
+
# @return [Array<UserDetailsAdmin>]
|
309
|
+
def list_organization_users(opts = {})
|
310
|
+
data, _status_code, _headers = list_organization_users_with_http_info(opts)
|
311
|
+
return data
|
312
|
+
end
|
313
|
+
|
314
|
+
# List the organization users
|
315
|
+
#
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @option opts [String] :role Filter users by role
|
318
|
+
# @option opts [Integer] :limit This is the maximum number of objects that may be returned
|
319
|
+
# @option opts [String] :_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.
|
320
|
+
# @option opts [String] :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.
|
321
|
+
# @return [Array<(Array<UserDetailsAdmin>, Fixnum, Hash)>] Array<UserDetailsAdmin> data, response status code and response headers
|
322
|
+
def list_organization_users_with_http_info(opts = {})
|
323
|
+
if @api_client.config.debugging
|
324
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_users ..."
|
325
|
+
end
|
326
|
+
if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
|
327
|
+
fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
|
328
|
+
end
|
329
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
330
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_users, must be smaller than or equal to 1000.'
|
331
|
+
end
|
332
|
+
|
333
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
334
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_users, must be greater than or equal to 1.'
|
335
|
+
end
|
336
|
+
|
337
|
+
# resource path
|
338
|
+
local_var_path = "/organizations/users"
|
339
|
+
|
340
|
+
# query parameters
|
341
|
+
query_params = {}
|
342
|
+
query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
|
343
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
344
|
+
query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
|
345
|
+
query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
|
346
|
+
|
347
|
+
# header parameters
|
348
|
+
header_params = {}
|
349
|
+
# HTTP header 'Accept' (if needed)
|
350
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
351
|
+
# HTTP header 'Content-Type'
|
352
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
353
|
+
|
354
|
+
# form parameters
|
355
|
+
form_params = {}
|
356
|
+
|
357
|
+
# http body (model)
|
358
|
+
post_body = nil
|
359
|
+
auth_names = ['OAuth2']
|
360
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
361
|
+
:header_params => header_params,
|
362
|
+
:query_params => query_params,
|
363
|
+
:form_params => form_params,
|
364
|
+
:body => post_body,
|
365
|
+
:auth_names => auth_names,
|
366
|
+
:return_type => 'Array<UserDetailsAdmin>')
|
367
|
+
if @api_client.config.debugging
|
368
|
+
@api_client.config.logger.debug "API called: OrganizationApi#list_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
369
|
+
end
|
370
|
+
return data, status_code, headers
|
371
|
+
end
|
372
|
+
|
373
|
+
# Remove an organization invitation
|
374
|
+
#
|
375
|
+
# @param invitation Unique identifier of the invitation
|
376
|
+
# @param [Hash] opts the optional parameters
|
377
|
+
# @return [nil]
|
378
|
+
def remove_organization_invitation(invitation, opts = {})
|
379
|
+
remove_organization_invitation_with_http_info(invitation, opts)
|
380
|
+
return nil
|
381
|
+
end
|
382
|
+
|
383
|
+
# Remove an organization invitation
|
384
|
+
#
|
385
|
+
# @param invitation Unique identifier of the invitation
|
386
|
+
# @param [Hash] opts the optional parameters
|
387
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
388
|
+
def remove_organization_invitation_with_http_info(invitation, opts = {})
|
389
|
+
if @api_client.config.debugging
|
390
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_invitation ..."
|
391
|
+
end
|
392
|
+
# verify the required parameter 'invitation' is set
|
393
|
+
if @api_client.config.client_side_validation && invitation.nil?
|
394
|
+
fail ArgumentError, "Missing the required parameter 'invitation' when calling OrganizationApi.remove_organization_invitation"
|
395
|
+
end
|
396
|
+
# resource path
|
397
|
+
local_var_path = "/organizations/invitations/{invitation}".sub('{' + 'invitation' + '}', invitation.to_s)
|
398
|
+
|
399
|
+
# query parameters
|
400
|
+
query_params = {}
|
401
|
+
|
402
|
+
# header parameters
|
403
|
+
header_params = {}
|
404
|
+
# HTTP header 'Accept' (if needed)
|
405
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
406
|
+
# HTTP header 'Content-Type'
|
407
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
408
|
+
|
409
|
+
# form parameters
|
410
|
+
form_params = {}
|
411
|
+
|
412
|
+
# http body (model)
|
413
|
+
post_body = nil
|
414
|
+
auth_names = ['OAuth2']
|
415
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
416
|
+
:header_params => header_params,
|
417
|
+
:query_params => query_params,
|
418
|
+
:form_params => form_params,
|
419
|
+
:body => post_body,
|
420
|
+
:auth_names => auth_names)
|
421
|
+
if @api_client.config.debugging
|
422
|
+
@api_client.config.logger.debug "API called: OrganizationApi#remove_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
423
|
+
end
|
424
|
+
return data, status_code, headers
|
425
|
+
end
|
426
|
+
|
427
|
+
# Remove an account from Flat
|
428
|
+
# 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)
|
429
|
+
# @param user Unique identifier of the Flat account
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @option opts [BOOLEAN] :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.
|
432
|
+
# @return [nil]
|
433
|
+
def remove_organization_user(user, opts = {})
|
434
|
+
remove_organization_user_with_http_info(user, opts)
|
435
|
+
return nil
|
436
|
+
end
|
437
|
+
|
438
|
+
# Remove an account from Flat
|
439
|
+
# 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)
|
440
|
+
# @param user Unique identifier of the Flat account
|
441
|
+
# @param [Hash] opts the optional parameters
|
442
|
+
# @option opts [BOOLEAN] :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.
|
443
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
444
|
+
def remove_organization_user_with_http_info(user, opts = {})
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_user ..."
|
447
|
+
end
|
448
|
+
# verify the required parameter 'user' is set
|
449
|
+
if @api_client.config.client_side_validation && user.nil?
|
450
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.remove_organization_user"
|
451
|
+
end
|
452
|
+
# resource path
|
453
|
+
local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)
|
454
|
+
|
455
|
+
# query parameters
|
456
|
+
query_params = {}
|
457
|
+
query_params[:'convertToIndividual'] = opts[:'convert_to_individual'] if !opts[:'convert_to_individual'].nil?
|
458
|
+
|
459
|
+
# header parameters
|
460
|
+
header_params = {}
|
461
|
+
# HTTP header 'Accept' (if needed)
|
462
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
463
|
+
# HTTP header 'Content-Type'
|
464
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
465
|
+
|
466
|
+
# form parameters
|
467
|
+
form_params = {}
|
468
|
+
|
469
|
+
# http body (model)
|
470
|
+
post_body = nil
|
471
|
+
auth_names = ['OAuth2']
|
472
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names)
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug "API called: OrganizationApi#remove_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
480
|
+
end
|
481
|
+
return data, status_code, headers
|
482
|
+
end
|
483
|
+
|
484
|
+
# Revoke LTI 1.x credentials
|
485
|
+
#
|
486
|
+
# @param credentials Credentials unique identifier
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [nil]
|
489
|
+
def revoke_lti_credentials(credentials, opts = {})
|
490
|
+
revoke_lti_credentials_with_http_info(credentials, opts)
|
491
|
+
return nil
|
492
|
+
end
|
493
|
+
|
494
|
+
# Revoke LTI 1.x credentials
|
495
|
+
#
|
496
|
+
# @param credentials Credentials unique identifier
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
499
|
+
def revoke_lti_credentials_with_http_info(credentials, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.revoke_lti_credentials ..."
|
502
|
+
end
|
503
|
+
# verify the required parameter 'credentials' is set
|
504
|
+
if @api_client.config.client_side_validation && credentials.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'credentials' when calling OrganizationApi.revoke_lti_credentials"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = "/organizations/lti/credentials/{credentials}".sub('{' + 'credentials' + '}', credentials.to_s)
|
509
|
+
|
510
|
+
# query parameters
|
511
|
+
query_params = {}
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = {}
|
515
|
+
# HTTP header 'Accept' (if needed)
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
517
|
+
# HTTP header 'Content-Type'
|
518
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
519
|
+
|
520
|
+
# form parameters
|
521
|
+
form_params = {}
|
522
|
+
|
523
|
+
# http body (model)
|
524
|
+
post_body = nil
|
525
|
+
auth_names = ['OAuth2']
|
526
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
527
|
+
:header_params => header_params,
|
528
|
+
:query_params => query_params,
|
529
|
+
:form_params => form_params,
|
530
|
+
:body => post_body,
|
531
|
+
:auth_names => auth_names)
|
532
|
+
if @api_client.config.debugging
|
533
|
+
@api_client.config.logger.debug "API called: OrganizationApi#revoke_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
|
+
end
|
535
|
+
return data, status_code, headers
|
536
|
+
end
|
537
|
+
|
538
|
+
# Update account information
|
539
|
+
#
|
540
|
+
# @param user Unique identifier of the Flat account
|
541
|
+
# @param body
|
542
|
+
# @param [Hash] opts the optional parameters
|
543
|
+
# @return [UserDetailsAdmin]
|
544
|
+
def update_organization_user(user, body, opts = {})
|
545
|
+
data, _status_code, _headers = update_organization_user_with_http_info(user, body, opts)
|
546
|
+
return data
|
547
|
+
end
|
548
|
+
|
549
|
+
# Update account information
|
550
|
+
#
|
551
|
+
# @param user Unique identifier of the Flat account
|
552
|
+
# @param body
|
553
|
+
# @param [Hash] opts the optional parameters
|
554
|
+
# @return [Array<(UserDetailsAdmin, Fixnum, Hash)>] UserDetailsAdmin data, response status code and response headers
|
555
|
+
def update_organization_user_with_http_info(user, body, opts = {})
|
556
|
+
if @api_client.config.debugging
|
557
|
+
@api_client.config.logger.debug "Calling API: OrganizationApi.update_organization_user ..."
|
558
|
+
end
|
559
|
+
# verify the required parameter 'user' is set
|
560
|
+
if @api_client.config.client_side_validation && user.nil?
|
561
|
+
fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.update_organization_user"
|
562
|
+
end
|
563
|
+
# verify the required parameter 'body' is set
|
564
|
+
if @api_client.config.client_side_validation && body.nil?
|
565
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.update_organization_user"
|
566
|
+
end
|
567
|
+
# resource path
|
568
|
+
local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)
|
569
|
+
|
570
|
+
# query parameters
|
571
|
+
query_params = {}
|
572
|
+
|
573
|
+
# header parameters
|
574
|
+
header_params = {}
|
575
|
+
# HTTP header 'Accept' (if needed)
|
576
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
577
|
+
# HTTP header 'Content-Type'
|
578
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
579
|
+
|
580
|
+
# form parameters
|
581
|
+
form_params = {}
|
582
|
+
|
583
|
+
# http body (model)
|
584
|
+
post_body = @api_client.object_to_http_body(body)
|
585
|
+
auth_names = ['OAuth2']
|
586
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
587
|
+
:header_params => header_params,
|
588
|
+
:query_params => query_params,
|
589
|
+
:form_params => form_params,
|
590
|
+
:body => post_body,
|
591
|
+
:auth_names => auth_names,
|
592
|
+
:return_type => 'UserDetailsAdmin')
|
593
|
+
if @api_client.config.debugging
|
594
|
+
@api_client.config.logger.debug "API called: OrganizationApi#update_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
595
|
+
end
|
596
|
+
return data, status_code, headers
|
597
|
+
end
|
598
|
+
end
|
599
|
+
end
|