google-apis-classroom_v1 0.31.0 → 0.32.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -544,6 +544,63 @@ module Google
|
|
544
544
|
execute_or_queue_command(command, &block)
|
545
545
|
end
|
546
546
|
|
547
|
+
# Gets metadata for Classroom add-ons in the context of a specific post. To
|
548
|
+
# maintain the integrity of its own data and permissions model, an add-on should
|
549
|
+
# call this to validate query parameters and the requesting user's role whenever
|
550
|
+
# the add-on is opened in an [iframe](https://developers.google.com/classroom/
|
551
|
+
# add-ons/get-started/iframes/iframes-overview). This method returns the
|
552
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
553
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
554
|
+
# identified resources does not exist.
|
555
|
+
# @param [String] course_id
|
556
|
+
# Required. Identifier of the course.
|
557
|
+
# @param [String] item_id
|
558
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
559
|
+
# the attachment is attached. This field is required, but is not marked as such
|
560
|
+
# while we are migrating from post_id.
|
561
|
+
# @param [String] add_on_token
|
562
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
563
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. The
|
564
|
+
# authorization token is required when neither of the following is true: * The
|
565
|
+
# add-on has attachments on the post. * The developer project issuing the
|
566
|
+
# request is the same project that created the post.
|
567
|
+
# @param [String] attachment_id
|
568
|
+
# Optional. The identifier of the attachment. This field is required for student
|
569
|
+
# users and optional for teacher users. If not provided in the student case, an
|
570
|
+
# error is returned.
|
571
|
+
# @param [String] post_id
|
572
|
+
# Optional. Deprecated, use item_id instead.
|
573
|
+
# @param [String] fields
|
574
|
+
# Selector specifying which fields to include in a partial response.
|
575
|
+
# @param [String] quota_user
|
576
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
577
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
578
|
+
# @param [Google::Apis::RequestOptions] options
|
579
|
+
# Request-specific options
|
580
|
+
#
|
581
|
+
# @yield [result, err] Result & error if block supplied
|
582
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnContext] parsed result object
|
583
|
+
# @yieldparam err [StandardError] error object if request failed
|
584
|
+
#
|
585
|
+
# @return [Google::Apis::ClassroomV1::AddOnContext]
|
586
|
+
#
|
587
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
588
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
589
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
590
|
+
def get_course_announcement_add_on_context(course_id, item_id, add_on_token: nil, attachment_id: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
591
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/announcements/{itemId}/addOnContext', options)
|
592
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnContext::Representation
|
593
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnContext
|
594
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
595
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
596
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
597
|
+
command.query['attachmentId'] = attachment_id unless attachment_id.nil?
|
598
|
+
command.query['postId'] = post_id unless post_id.nil?
|
599
|
+
command.query['fields'] = fields unless fields.nil?
|
600
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
601
|
+
execute_or_queue_command(command, &block)
|
602
|
+
end
|
603
|
+
|
547
604
|
# Returns a list of announcements that the requester is permitted to view.
|
548
605
|
# Course students may only view `PUBLISHED` announcements. Course teachers and
|
549
606
|
# domain administrators may view all announcements. This method returns the
|
@@ -694,6 +751,257 @@ module Google
|
|
694
751
|
execute_or_queue_command(command, &block)
|
695
752
|
end
|
696
753
|
|
754
|
+
# Creates an add-on attachment under a post. Requires the add-on to have
|
755
|
+
# permission to create new attachments on the post. This method returns the
|
756
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
757
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
758
|
+
# identified resources does not exist.
|
759
|
+
# @param [String] course_id
|
760
|
+
# Required. Identifier of the course.
|
761
|
+
# @param [String] item_id
|
762
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
763
|
+
# to create the attachment. This field is required, but is not marked as such
|
764
|
+
# while we are migrating from post_id.
|
765
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
766
|
+
# @param [String] add_on_token
|
767
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
768
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. This
|
769
|
+
# authorization token is required for in-Classroom attachment creation but
|
770
|
+
# optional for partner-first attachment creation. Returns an error if not
|
771
|
+
# provided for partner-first attachment creation and the developer projects that
|
772
|
+
# created the attachment and its parent stream item do not match.
|
773
|
+
# @param [String] post_id
|
774
|
+
# Optional. Deprecated, use item_id instead.
|
775
|
+
# @param [String] fields
|
776
|
+
# Selector specifying which fields to include in a partial response.
|
777
|
+
# @param [String] quota_user
|
778
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
779
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
780
|
+
# @param [Google::Apis::RequestOptions] options
|
781
|
+
# Request-specific options
|
782
|
+
#
|
783
|
+
# @yield [result, err] Result & error if block supplied
|
784
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
785
|
+
# @yieldparam err [StandardError] error object if request failed
|
786
|
+
#
|
787
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
788
|
+
#
|
789
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
790
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
791
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
792
|
+
def create_course_announcement_add_on_attachment(course_id, item_id, add_on_attachment_object = nil, add_on_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
793
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/announcements/{itemId}/addOnAttachments', options)
|
794
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
795
|
+
command.request_object = add_on_attachment_object
|
796
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
797
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
798
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
799
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
800
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
801
|
+
command.query['postId'] = post_id unless post_id.nil?
|
802
|
+
command.query['fields'] = fields unless fields.nil?
|
803
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
804
|
+
execute_or_queue_command(command, &block)
|
805
|
+
end
|
806
|
+
|
807
|
+
# Deletes an add-on attachment. Requires the add-on to have been the original
|
808
|
+
# creator of the attachment. This method returns the following error codes: * `
|
809
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
810
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
811
|
+
# @param [String] course_id
|
812
|
+
# Required. Identifier of the course.
|
813
|
+
# @param [String] item_id
|
814
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
815
|
+
# the attachment is attached. This field is required, but is not marked as such
|
816
|
+
# while we are migrating from post_id.
|
817
|
+
# @param [String] attachment_id
|
818
|
+
# Required. Identifier of the attachment.
|
819
|
+
# @param [String] post_id
|
820
|
+
# Optional. Deprecated, use item_id instead.
|
821
|
+
# @param [String] fields
|
822
|
+
# Selector specifying which fields to include in a partial response.
|
823
|
+
# @param [String] quota_user
|
824
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
825
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
826
|
+
# @param [Google::Apis::RequestOptions] options
|
827
|
+
# Request-specific options
|
828
|
+
#
|
829
|
+
# @yield [result, err] Result & error if block supplied
|
830
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
831
|
+
# @yieldparam err [StandardError] error object if request failed
|
832
|
+
#
|
833
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
834
|
+
#
|
835
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
836
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
837
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
838
|
+
def delete_course_announcement_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
839
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}', options)
|
840
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
841
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
842
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
843
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
844
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
845
|
+
command.query['postId'] = post_id unless post_id.nil?
|
846
|
+
command.query['fields'] = fields unless fields.nil?
|
847
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
848
|
+
execute_or_queue_command(command, &block)
|
849
|
+
end
|
850
|
+
|
851
|
+
# Returns an add-on attachment. Requires the add-on requesting the attachment to
|
852
|
+
# be the original creator of the attachment. This method returns the following
|
853
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
854
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
855
|
+
# does not exist.
|
856
|
+
# @param [String] course_id
|
857
|
+
# Required. Identifier of the course.
|
858
|
+
# @param [String] item_id
|
859
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
860
|
+
# the attachment is attached. This field is required, but is not marked as such
|
861
|
+
# while we are migrating from post_id.
|
862
|
+
# @param [String] attachment_id
|
863
|
+
# Required. Identifier of the attachment.
|
864
|
+
# @param [String] post_id
|
865
|
+
# Optional. Deprecated, use item_id instead.
|
866
|
+
# @param [String] fields
|
867
|
+
# Selector specifying which fields to include in a partial response.
|
868
|
+
# @param [String] quota_user
|
869
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
870
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
871
|
+
# @param [Google::Apis::RequestOptions] options
|
872
|
+
# Request-specific options
|
873
|
+
#
|
874
|
+
# @yield [result, err] Result & error if block supplied
|
875
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
876
|
+
# @yieldparam err [StandardError] error object if request failed
|
877
|
+
#
|
878
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
879
|
+
#
|
880
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
881
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
882
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
883
|
+
def get_course_announcement_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
884
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}', options)
|
885
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
886
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
887
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
888
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
889
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
890
|
+
command.query['postId'] = post_id unless post_id.nil?
|
891
|
+
command.query['fields'] = fields unless fields.nil?
|
892
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
893
|
+
execute_or_queue_command(command, &block)
|
894
|
+
end
|
895
|
+
|
896
|
+
# Returns all attachments created by an add-on under the post. Requires the add-
|
897
|
+
# on to have active attachments on the post or have permission to create new
|
898
|
+
# attachments on the post. This method returns the following error codes: * `
|
899
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
900
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
901
|
+
# @param [String] course_id
|
902
|
+
# Required. Identifier of the course.
|
903
|
+
# @param [String] item_id
|
904
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial whose
|
905
|
+
# attachments should be enumerated. This field is required, but is not marked as
|
906
|
+
# such while we are migrating from post_id.
|
907
|
+
# @param [Fixnum] page_size
|
908
|
+
# The maximum number of attachments to return. The service may return fewer than
|
909
|
+
# this value. If unspecified, at most 20 attachments will be returned. The
|
910
|
+
# maximum value is 20; values above 20 will be coerced to 20.
|
911
|
+
# @param [String] page_token
|
912
|
+
# A page token, received from a previous `ListAddOnAttachments` call. Provide
|
913
|
+
# this to retrieve the subsequent page. When paginating, all other parameters
|
914
|
+
# provided to `ListAddOnAttachments` must match the call that provided the page
|
915
|
+
# token.
|
916
|
+
# @param [String] post_id
|
917
|
+
# Optional. Identifier of the post under the course whose attachments to
|
918
|
+
# enumerate. Deprecated, use item_id instead.
|
919
|
+
# @param [String] fields
|
920
|
+
# Selector specifying which fields to include in a partial response.
|
921
|
+
# @param [String] quota_user
|
922
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
923
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
924
|
+
# @param [Google::Apis::RequestOptions] options
|
925
|
+
# Request-specific options
|
926
|
+
#
|
927
|
+
# @yield [result, err] Result & error if block supplied
|
928
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse] parsed result object
|
929
|
+
# @yieldparam err [StandardError] error object if request failed
|
930
|
+
#
|
931
|
+
# @return [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse]
|
932
|
+
#
|
933
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
934
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
935
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
936
|
+
def list_course_announcement_add_on_attachments(course_id, item_id, page_size: nil, page_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
937
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/announcements/{itemId}/addOnAttachments', options)
|
938
|
+
command.response_representation = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse::Representation
|
939
|
+
command.response_class = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse
|
940
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
941
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
942
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
943
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
944
|
+
command.query['postId'] = post_id unless post_id.nil?
|
945
|
+
command.query['fields'] = fields unless fields.nil?
|
946
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
947
|
+
execute_or_queue_command(command, &block)
|
948
|
+
end
|
949
|
+
|
950
|
+
# Updates an add-on attachment. Requires the add-on to have been the original
|
951
|
+
# creator of the attachment. This method returns the following error codes: * `
|
952
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
953
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
954
|
+
# @param [String] course_id
|
955
|
+
# Required. Identifier of the course.
|
956
|
+
# @param [String] item_id
|
957
|
+
# Identifier of the post under which the attachment is attached.
|
958
|
+
# @param [String] attachment_id
|
959
|
+
# Required. Identifier of the attachment.
|
960
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
961
|
+
# @param [String] post_id
|
962
|
+
# Required. Identifier of the post under which the attachment is attached.
|
963
|
+
# @param [String] update_mask
|
964
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
965
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
966
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
967
|
+
# AddOnAttachment` object. If a field that does not support empty values is
|
968
|
+
# included in the update mask and not set in the `AddOnAttachment` object, an `
|
969
|
+
# INVALID_ARGUMENT` error is returned. The following fields may be specified by
|
970
|
+
# teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `
|
971
|
+
# student_work_review_uri` * `due_date` * `due_time` * `max_points`
|
972
|
+
# @param [String] fields
|
973
|
+
# Selector specifying which fields to include in a partial response.
|
974
|
+
# @param [String] quota_user
|
975
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
976
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
977
|
+
# @param [Google::Apis::RequestOptions] options
|
978
|
+
# Request-specific options
|
979
|
+
#
|
980
|
+
# @yield [result, err] Result & error if block supplied
|
981
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
982
|
+
# @yieldparam err [StandardError] error object if request failed
|
983
|
+
#
|
984
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
985
|
+
#
|
986
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
987
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
988
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
989
|
+
def patch_course_announcement_add_on_attachment(course_id, item_id, attachment_id, add_on_attachment_object = nil, post_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
990
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}', options)
|
991
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
992
|
+
command.request_object = add_on_attachment_object
|
993
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
994
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
995
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
996
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
997
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
998
|
+
command.query['postId'] = post_id unless post_id.nil?
|
999
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1000
|
+
command.query['fields'] = fields unless fields.nil?
|
1001
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1002
|
+
execute_or_queue_command(command, &block)
|
1003
|
+
end
|
1004
|
+
|
697
1005
|
# Creates course work. The resulting course work (and corresponding student
|
698
1006
|
# submissions) are associated with the Developer Console project of the [OAuth
|
699
1007
|
# client ID](https://support.google.com/cloud/answer/6158849) used to make the
|
@@ -818,6 +1126,63 @@ module Google
|
|
818
1126
|
execute_or_queue_command(command, &block)
|
819
1127
|
end
|
820
1128
|
|
1129
|
+
# Gets metadata for Classroom add-ons in the context of a specific post. To
|
1130
|
+
# maintain the integrity of its own data and permissions model, an add-on should
|
1131
|
+
# call this to validate query parameters and the requesting user's role whenever
|
1132
|
+
# the add-on is opened in an [iframe](https://developers.google.com/classroom/
|
1133
|
+
# add-ons/get-started/iframes/iframes-overview). This method returns the
|
1134
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
1135
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
1136
|
+
# identified resources does not exist.
|
1137
|
+
# @param [String] course_id
|
1138
|
+
# Required. Identifier of the course.
|
1139
|
+
# @param [String] item_id
|
1140
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1141
|
+
# the attachment is attached. This field is required, but is not marked as such
|
1142
|
+
# while we are migrating from post_id.
|
1143
|
+
# @param [String] add_on_token
|
1144
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
1145
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. The
|
1146
|
+
# authorization token is required when neither of the following is true: * The
|
1147
|
+
# add-on has attachments on the post. * The developer project issuing the
|
1148
|
+
# request is the same project that created the post.
|
1149
|
+
# @param [String] attachment_id
|
1150
|
+
# Optional. The identifier of the attachment. This field is required for student
|
1151
|
+
# users and optional for teacher users. If not provided in the student case, an
|
1152
|
+
# error is returned.
|
1153
|
+
# @param [String] post_id
|
1154
|
+
# Optional. Deprecated, use item_id instead.
|
1155
|
+
# @param [String] fields
|
1156
|
+
# Selector specifying which fields to include in a partial response.
|
1157
|
+
# @param [String] quota_user
|
1158
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1159
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1160
|
+
# @param [Google::Apis::RequestOptions] options
|
1161
|
+
# Request-specific options
|
1162
|
+
#
|
1163
|
+
# @yield [result, err] Result & error if block supplied
|
1164
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnContext] parsed result object
|
1165
|
+
# @yieldparam err [StandardError] error object if request failed
|
1166
|
+
#
|
1167
|
+
# @return [Google::Apis::ClassroomV1::AddOnContext]
|
1168
|
+
#
|
1169
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1170
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1171
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1172
|
+
def get_course_course_work_add_on_context(course_id, item_id, add_on_token: nil, attachment_id: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1173
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{itemId}/addOnContext', options)
|
1174
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnContext::Representation
|
1175
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnContext
|
1176
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1177
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1178
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
1179
|
+
command.query['attachmentId'] = attachment_id unless attachment_id.nil?
|
1180
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1181
|
+
command.query['fields'] = fields unless fields.nil?
|
1182
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1183
|
+
execute_or_queue_command(command, &block)
|
1184
|
+
end
|
1185
|
+
|
821
1186
|
# Returns a list of course work that the requester is permitted to view. Course
|
822
1187
|
# students may only view `PUBLISHED` course work. Course teachers and domain
|
823
1188
|
# administrators may view all course work. This method returns the following
|
@@ -975,18 +1340,27 @@ module Google
|
|
975
1340
|
execute_or_queue_command(command, &block)
|
976
1341
|
end
|
977
1342
|
|
978
|
-
#
|
979
|
-
#
|
980
|
-
#
|
981
|
-
# malformed. * `NOT_FOUND` if
|
982
|
-
#
|
1343
|
+
# Creates an add-on attachment under a post. Requires the add-on to have
|
1344
|
+
# permission to create new attachments on the post. This method returns the
|
1345
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
1346
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
1347
|
+
# identified resources does not exist.
|
983
1348
|
# @param [String] course_id
|
984
|
-
# Identifier of the course.
|
985
|
-
#
|
986
|
-
#
|
987
|
-
#
|
988
|
-
#
|
989
|
-
#
|
1349
|
+
# Required. Identifier of the course.
|
1350
|
+
# @param [String] item_id
|
1351
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1352
|
+
# to create the attachment. This field is required, but is not marked as such
|
1353
|
+
# while we are migrating from post_id.
|
1354
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
1355
|
+
# @param [String] add_on_token
|
1356
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
1357
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. This
|
1358
|
+
# authorization token is required for in-Classroom attachment creation but
|
1359
|
+
# optional for partner-first attachment creation. Returns an error if not
|
1360
|
+
# provided for partner-first attachment creation and the developer projects that
|
1361
|
+
# created the attachment and its parent stream item do not match.
|
1362
|
+
# @param [String] post_id
|
1363
|
+
# Optional. Deprecated, use item_id instead.
|
990
1364
|
# @param [String] fields
|
991
1365
|
# Selector specifying which fields to include in a partial response.
|
992
1366
|
# @param [String] quota_user
|
@@ -996,62 +1370,43 @@ module Google
|
|
996
1370
|
# Request-specific options
|
997
1371
|
#
|
998
1372
|
# @yield [result, err] Result & error if block supplied
|
999
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
1373
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
1000
1374
|
# @yieldparam err [StandardError] error object if request failed
|
1001
1375
|
#
|
1002
|
-
# @return [Google::Apis::ClassroomV1::
|
1376
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
1003
1377
|
#
|
1004
1378
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1005
1379
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1006
1380
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1007
|
-
def
|
1008
|
-
command = make_simple_command(:
|
1009
|
-
command.
|
1010
|
-
command.
|
1381
|
+
def create_course_course_work_add_on_attachment(course_id, item_id, add_on_attachment_object = nil, add_on_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1382
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments', options)
|
1383
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
1384
|
+
command.request_object = add_on_attachment_object
|
1385
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
1386
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
1011
1387
|
command.params['courseId'] = course_id unless course_id.nil?
|
1012
|
-
command.params['
|
1013
|
-
command.
|
1388
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1389
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
1390
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1014
1391
|
command.query['fields'] = fields unless fields.nil?
|
1015
1392
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1016
1393
|
execute_or_queue_command(command, &block)
|
1017
1394
|
end
|
1018
1395
|
|
1019
|
-
#
|
1020
|
-
#
|
1021
|
-
#
|
1022
|
-
#
|
1023
|
-
# administrators may view all student submissions. This method returns the
|
1024
|
-
# following error codes: * `PERMISSION_DENIED` if the requesting user is not
|
1025
|
-
# permitted to access the requested course or course work, or for access errors.
|
1026
|
-
# * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
1027
|
-
# requested course does not exist.
|
1396
|
+
# Deletes an add-on attachment. Requires the add-on to have been the original
|
1397
|
+
# creator of the attachment. This method returns the following error codes: * `
|
1398
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
1399
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
1028
1400
|
# @param [String] course_id
|
1029
|
-
# Identifier of the course.
|
1030
|
-
#
|
1031
|
-
#
|
1032
|
-
#
|
1033
|
-
#
|
1034
|
-
#
|
1035
|
-
#
|
1036
|
-
#
|
1037
|
-
#
|
1038
|
-
# regardless of `late` value.
|
1039
|
-
# @param [Fixnum] page_size
|
1040
|
-
# Maximum number of items to return. Zero or unspecified indicates that the
|
1041
|
-
# server may assign a maximum. The server may return fewer than the specified
|
1042
|
-
# number of results.
|
1043
|
-
# @param [String] page_token
|
1044
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
1045
|
-
# subsequent page of results should be returned. The list request must be
|
1046
|
-
# otherwise identical to the one that resulted in this token.
|
1047
|
-
# @param [Array<String>, String] states
|
1048
|
-
# Requested submission states. If specified, returned student submissions match
|
1049
|
-
# one of the specified submission states.
|
1050
|
-
# @param [String] user_id
|
1051
|
-
# Optional argument to restrict returned student work to those owned by the
|
1052
|
-
# student with the specified identifier. The identifier can be one of the
|
1053
|
-
# following: * the numeric identifier for the user * the email address of the
|
1054
|
-
# user * the string literal `"me"`, indicating the requesting user
|
1401
|
+
# Required. Identifier of the course.
|
1402
|
+
# @param [String] item_id
|
1403
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1404
|
+
# the attachment is attached. This field is required, but is not marked as such
|
1405
|
+
# while we are migrating from post_id.
|
1406
|
+
# @param [String] attachment_id
|
1407
|
+
# Required. Identifier of the attachment.
|
1408
|
+
# @param [String] post_id
|
1409
|
+
# Optional. Deprecated, use item_id instead.
|
1055
1410
|
# @param [String] fields
|
1056
1411
|
# Selector specifying which fields to include in a partial response.
|
1057
1412
|
# @param [String] quota_user
|
@@ -1061,48 +1416,42 @@ module Google
|
|
1061
1416
|
# Request-specific options
|
1062
1417
|
#
|
1063
1418
|
# @yield [result, err] Result & error if block supplied
|
1064
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
1419
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
1065
1420
|
# @yieldparam err [StandardError] error object if request failed
|
1066
1421
|
#
|
1067
|
-
# @return [Google::Apis::ClassroomV1::
|
1422
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
1068
1423
|
#
|
1069
1424
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1070
1425
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1071
1426
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1072
|
-
def
|
1073
|
-
command = make_simple_command(:
|
1074
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
1075
|
-
command.response_class = Google::Apis::ClassroomV1::
|
1427
|
+
def delete_course_course_work_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1428
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}', options)
|
1429
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
1430
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
1076
1431
|
command.params['courseId'] = course_id unless course_id.nil?
|
1077
|
-
command.params['
|
1078
|
-
command.
|
1079
|
-
command.query['
|
1080
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
1081
|
-
command.query['states'] = states unless states.nil?
|
1082
|
-
command.query['userId'] = user_id unless user_id.nil?
|
1432
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1433
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
1434
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1083
1435
|
command.query['fields'] = fields unless fields.nil?
|
1084
1436
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1085
1437
|
execute_or_queue_command(command, &block)
|
1086
1438
|
end
|
1087
1439
|
|
1088
|
-
#
|
1089
|
-
#
|
1090
|
-
#
|
1091
|
-
#
|
1092
|
-
#
|
1093
|
-
# error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
|
1094
|
-
# access the requested course or course work, if the user is not permitted to
|
1095
|
-
# modify attachments on the requested student submission, or for access errors. *
|
1096
|
-
# `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
1097
|
-
# requested course, course work, or student submission does not exist.
|
1440
|
+
# Returns an add-on attachment. Requires the add-on requesting the attachment to
|
1441
|
+
# be the original creator of the attachment. This method returns the following
|
1442
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
1443
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
1444
|
+
# does not exist.
|
1098
1445
|
# @param [String] course_id
|
1099
|
-
# Identifier of the course.
|
1100
|
-
#
|
1101
|
-
#
|
1102
|
-
#
|
1103
|
-
#
|
1104
|
-
#
|
1105
|
-
#
|
1446
|
+
# Required. Identifier of the course.
|
1447
|
+
# @param [String] item_id
|
1448
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1449
|
+
# the attachment is attached. This field is required, but is not marked as such
|
1450
|
+
# while we are migrating from post_id.
|
1451
|
+
# @param [String] attachment_id
|
1452
|
+
# Required. Identifier of the attachment.
|
1453
|
+
# @param [String] post_id
|
1454
|
+
# Optional. Deprecated, use item_id instead.
|
1106
1455
|
# @param [String] fields
|
1107
1456
|
# Selector specifying which fields to include in a partial response.
|
1108
1457
|
# @param [String] quota_user
|
@@ -1112,15 +1461,388 @@ module Google
|
|
1112
1461
|
# Request-specific options
|
1113
1462
|
#
|
1114
1463
|
# @yield [result, err] Result & error if block supplied
|
1115
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
1464
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
1116
1465
|
# @yieldparam err [StandardError] error object if request failed
|
1117
1466
|
#
|
1118
|
-
# @return [Google::Apis::ClassroomV1::
|
1467
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
1119
1468
|
#
|
1120
1469
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1121
1470
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1122
1471
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1123
|
-
def
|
1472
|
+
def get_course_course_work_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1473
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}', options)
|
1474
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
1475
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
1476
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1477
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1478
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
1479
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1480
|
+
command.query['fields'] = fields unless fields.nil?
|
1481
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1482
|
+
execute_or_queue_command(command, &block)
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
# Returns all attachments created by an add-on under the post. Requires the add-
|
1486
|
+
# on to have active attachments on the post or have permission to create new
|
1487
|
+
# attachments on the post. This method returns the following error codes: * `
|
1488
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
1489
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
1490
|
+
# @param [String] course_id
|
1491
|
+
# Required. Identifier of the course.
|
1492
|
+
# @param [String] item_id
|
1493
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial whose
|
1494
|
+
# attachments should be enumerated. This field is required, but is not marked as
|
1495
|
+
# such while we are migrating from post_id.
|
1496
|
+
# @param [Fixnum] page_size
|
1497
|
+
# The maximum number of attachments to return. The service may return fewer than
|
1498
|
+
# this value. If unspecified, at most 20 attachments will be returned. The
|
1499
|
+
# maximum value is 20; values above 20 will be coerced to 20.
|
1500
|
+
# @param [String] page_token
|
1501
|
+
# A page token, received from a previous `ListAddOnAttachments` call. Provide
|
1502
|
+
# this to retrieve the subsequent page. When paginating, all other parameters
|
1503
|
+
# provided to `ListAddOnAttachments` must match the call that provided the page
|
1504
|
+
# token.
|
1505
|
+
# @param [String] post_id
|
1506
|
+
# Optional. Identifier of the post under the course whose attachments to
|
1507
|
+
# enumerate. Deprecated, use item_id instead.
|
1508
|
+
# @param [String] fields
|
1509
|
+
# Selector specifying which fields to include in a partial response.
|
1510
|
+
# @param [String] quota_user
|
1511
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1512
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1513
|
+
# @param [Google::Apis::RequestOptions] options
|
1514
|
+
# Request-specific options
|
1515
|
+
#
|
1516
|
+
# @yield [result, err] Result & error if block supplied
|
1517
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse] parsed result object
|
1518
|
+
# @yieldparam err [StandardError] error object if request failed
|
1519
|
+
#
|
1520
|
+
# @return [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse]
|
1521
|
+
#
|
1522
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1523
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1524
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1525
|
+
def list_course_course_work_add_on_attachments(course_id, item_id, page_size: nil, page_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1526
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments', options)
|
1527
|
+
command.response_representation = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse::Representation
|
1528
|
+
command.response_class = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse
|
1529
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1530
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1531
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1532
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1533
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1534
|
+
command.query['fields'] = fields unless fields.nil?
|
1535
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1536
|
+
execute_or_queue_command(command, &block)
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# Updates an add-on attachment. Requires the add-on to have been the original
|
1540
|
+
# creator of the attachment. This method returns the following error codes: * `
|
1541
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
1542
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
1543
|
+
# @param [String] course_id
|
1544
|
+
# Required. Identifier of the course.
|
1545
|
+
# @param [String] item_id
|
1546
|
+
# Identifier of the post under which the attachment is attached.
|
1547
|
+
# @param [String] attachment_id
|
1548
|
+
# Required. Identifier of the attachment.
|
1549
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
1550
|
+
# @param [String] post_id
|
1551
|
+
# Required. Identifier of the post under which the attachment is attached.
|
1552
|
+
# @param [String] update_mask
|
1553
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
1554
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
1555
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
1556
|
+
# AddOnAttachment` object. If a field that does not support empty values is
|
1557
|
+
# included in the update mask and not set in the `AddOnAttachment` object, an `
|
1558
|
+
# INVALID_ARGUMENT` error is returned. The following fields may be specified by
|
1559
|
+
# teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `
|
1560
|
+
# student_work_review_uri` * `due_date` * `due_time` * `max_points`
|
1561
|
+
# @param [String] fields
|
1562
|
+
# Selector specifying which fields to include in a partial response.
|
1563
|
+
# @param [String] quota_user
|
1564
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1565
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1566
|
+
# @param [Google::Apis::RequestOptions] options
|
1567
|
+
# Request-specific options
|
1568
|
+
#
|
1569
|
+
# @yield [result, err] Result & error if block supplied
|
1570
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
1571
|
+
# @yieldparam err [StandardError] error object if request failed
|
1572
|
+
#
|
1573
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
1574
|
+
#
|
1575
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1576
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1577
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1578
|
+
def patch_course_course_work_add_on_attachment(course_id, item_id, attachment_id, add_on_attachment_object = nil, post_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1579
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}', options)
|
1580
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
1581
|
+
command.request_object = add_on_attachment_object
|
1582
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
1583
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
1584
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1585
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1586
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
1587
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1588
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1589
|
+
command.query['fields'] = fields unless fields.nil?
|
1590
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1591
|
+
execute_or_queue_command(command, &block)
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
# Returns a student submission for an add-on attachment. This method returns the
|
1595
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
1596
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
1597
|
+
# identified resources does not exist.
|
1598
|
+
# @param [String] course_id
|
1599
|
+
# Required. Identifier of the course.
|
1600
|
+
# @param [String] item_id
|
1601
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1602
|
+
# the attachment is attached. This field is required, but is not marked as such
|
1603
|
+
# while we are migrating from post_id.
|
1604
|
+
# @param [String] attachment_id
|
1605
|
+
# Required. Identifier of the attachment.
|
1606
|
+
# @param [String] submission_id
|
1607
|
+
# Required. Identifier of the student’s submission.
|
1608
|
+
# @param [String] post_id
|
1609
|
+
# Optional. Deprecated, use item_id instead.
|
1610
|
+
# @param [String] fields
|
1611
|
+
# Selector specifying which fields to include in a partial response.
|
1612
|
+
# @param [String] quota_user
|
1613
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1614
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1615
|
+
# @param [Google::Apis::RequestOptions] options
|
1616
|
+
# Request-specific options
|
1617
|
+
#
|
1618
|
+
# @yield [result, err] Result & error if block supplied
|
1619
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] parsed result object
|
1620
|
+
# @yieldparam err [StandardError] error object if request failed
|
1621
|
+
#
|
1622
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission]
|
1623
|
+
#
|
1624
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1625
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1626
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1627
|
+
def get_course_course_work_add_on_attachment_student_submission(course_id, item_id, attachment_id, submission_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1628
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}', options)
|
1629
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
1630
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission
|
1631
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1632
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1633
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
1634
|
+
command.params['submissionId'] = submission_id unless submission_id.nil?
|
1635
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1636
|
+
command.query['fields'] = fields unless fields.nil?
|
1637
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1638
|
+
execute_or_queue_command(command, &block)
|
1639
|
+
end
|
1640
|
+
|
1641
|
+
# Updates data associated with an add-on attachment submission. Requires the add-
|
1642
|
+
# on to have been the original creator of the attachment and the attachment to
|
1643
|
+
# have a positive `max_points` value set. This method returns the following
|
1644
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
1645
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
1646
|
+
# does not exist.
|
1647
|
+
# @param [String] course_id
|
1648
|
+
# Required. Identifier of the course.
|
1649
|
+
# @param [String] item_id
|
1650
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
1651
|
+
# the attachment is attached. This field is required, but is not marked as such
|
1652
|
+
# while we are migrating from post_id.
|
1653
|
+
# @param [String] attachment_id
|
1654
|
+
# Required. Identifier of the attachment.
|
1655
|
+
# @param [String] submission_id
|
1656
|
+
# Required. Identifier of the student's submission.
|
1657
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] add_on_attachment_student_submission_object
|
1658
|
+
# @param [String] post_id
|
1659
|
+
# Optional. Deprecated, use item_id instead.
|
1660
|
+
# @param [String] update_mask
|
1661
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
1662
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
1663
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
1664
|
+
# AddOnAttachmentStudentSubmission` object. The following fields may be
|
1665
|
+
# specified by teachers: * `points_earned`
|
1666
|
+
# @param [String] fields
|
1667
|
+
# Selector specifying which fields to include in a partial response.
|
1668
|
+
# @param [String] quota_user
|
1669
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1670
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1671
|
+
# @param [Google::Apis::RequestOptions] options
|
1672
|
+
# Request-specific options
|
1673
|
+
#
|
1674
|
+
# @yield [result, err] Result & error if block supplied
|
1675
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] parsed result object
|
1676
|
+
# @yieldparam err [StandardError] error object if request failed
|
1677
|
+
#
|
1678
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission]
|
1679
|
+
#
|
1680
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1681
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1682
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1683
|
+
def patch_course_course_work_add_on_attachment_student_submission(course_id, item_id, attachment_id, submission_id, add_on_attachment_student_submission_object = nil, post_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1684
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}', options)
|
1685
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
1686
|
+
command.request_object = add_on_attachment_student_submission_object
|
1687
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
1688
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission
|
1689
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1690
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
1691
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
1692
|
+
command.params['submissionId'] = submission_id unless submission_id.nil?
|
1693
|
+
command.query['postId'] = post_id unless post_id.nil?
|
1694
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1695
|
+
command.query['fields'] = fields unless fields.nil?
|
1696
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1697
|
+
execute_or_queue_command(command, &block)
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
# Returns a student submission. * `PERMISSION_DENIED` if the requesting user is
|
1701
|
+
# not permitted to access the requested course, course work, or student
|
1702
|
+
# submission or for access errors. * `INVALID_ARGUMENT` if the request is
|
1703
|
+
# malformed. * `NOT_FOUND` if the requested course, course work, or student
|
1704
|
+
# submission does not exist.
|
1705
|
+
# @param [String] course_id
|
1706
|
+
# Identifier of the course. This identifier can be either the Classroom-assigned
|
1707
|
+
# identifier or an alias.
|
1708
|
+
# @param [String] course_work_id
|
1709
|
+
# Identifier of the course work.
|
1710
|
+
# @param [String] id
|
1711
|
+
# Identifier of the student submission.
|
1712
|
+
# @param [String] fields
|
1713
|
+
# Selector specifying which fields to include in a partial response.
|
1714
|
+
# @param [String] quota_user
|
1715
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1716
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1717
|
+
# @param [Google::Apis::RequestOptions] options
|
1718
|
+
# Request-specific options
|
1719
|
+
#
|
1720
|
+
# @yield [result, err] Result & error if block supplied
|
1721
|
+
# @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
|
1722
|
+
# @yieldparam err [StandardError] error object if request failed
|
1723
|
+
#
|
1724
|
+
# @return [Google::Apis::ClassroomV1::StudentSubmission]
|
1725
|
+
#
|
1726
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1727
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1728
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1729
|
+
def get_student_submission(course_id, course_work_id, id, fields: nil, quota_user: nil, options: nil, &block)
|
1730
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
|
1731
|
+
command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
|
1732
|
+
command.response_class = Google::Apis::ClassroomV1::StudentSubmission
|
1733
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1734
|
+
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
1735
|
+
command.params['id'] = id unless id.nil?
|
1736
|
+
command.query['fields'] = fields unless fields.nil?
|
1737
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1738
|
+
execute_or_queue_command(command, &block)
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
# Returns a list of student submissions that the requester is permitted to view,
|
1742
|
+
# factoring in the OAuth scopes of the request. `-` may be specified as the `
|
1743
|
+
# course_work_id` to include student submissions for multiple course work items.
|
1744
|
+
# Course students may only view their own work. Course teachers and domain
|
1745
|
+
# administrators may view all student submissions. This method returns the
|
1746
|
+
# following error codes: * `PERMISSION_DENIED` if the requesting user is not
|
1747
|
+
# permitted to access the requested course or course work, or for access errors.
|
1748
|
+
# * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
1749
|
+
# requested course does not exist.
|
1750
|
+
# @param [String] course_id
|
1751
|
+
# Identifier of the course. This identifier can be either the Classroom-assigned
|
1752
|
+
# identifier or an alias.
|
1753
|
+
# @param [String] course_work_id
|
1754
|
+
# Identifier of the student work to request. This may be set to the string
|
1755
|
+
# literal `"-"` to request student work for all course work in the specified
|
1756
|
+
# course.
|
1757
|
+
# @param [String] late
|
1758
|
+
# Requested lateness value. If specified, returned student submissions are
|
1759
|
+
# restricted by the requested value. If unspecified, submissions are returned
|
1760
|
+
# regardless of `late` value.
|
1761
|
+
# @param [Fixnum] page_size
|
1762
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
1763
|
+
# server may assign a maximum. The server may return fewer than the specified
|
1764
|
+
# number of results.
|
1765
|
+
# @param [String] page_token
|
1766
|
+
# nextPageToken value returned from a previous list call, indicating that the
|
1767
|
+
# subsequent page of results should be returned. The list request must be
|
1768
|
+
# otherwise identical to the one that resulted in this token.
|
1769
|
+
# @param [Array<String>, String] states
|
1770
|
+
# Requested submission states. If specified, returned student submissions match
|
1771
|
+
# one of the specified submission states.
|
1772
|
+
# @param [String] user_id
|
1773
|
+
# Optional argument to restrict returned student work to those owned by the
|
1774
|
+
# student with the specified identifier. The identifier can be one of the
|
1775
|
+
# following: * the numeric identifier for the user * the email address of the
|
1776
|
+
# user * the string literal `"me"`, indicating the requesting user
|
1777
|
+
# @param [String] fields
|
1778
|
+
# Selector specifying which fields to include in a partial response.
|
1779
|
+
# @param [String] quota_user
|
1780
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1781
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1782
|
+
# @param [Google::Apis::RequestOptions] options
|
1783
|
+
# Request-specific options
|
1784
|
+
#
|
1785
|
+
# @yield [result, err] Result & error if block supplied
|
1786
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object
|
1787
|
+
# @yieldparam err [StandardError] error object if request failed
|
1788
|
+
#
|
1789
|
+
# @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse]
|
1790
|
+
#
|
1791
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1792
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1793
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1794
|
+
def list_student_submissions(course_id, course_work_id, late: nil, page_size: nil, page_token: nil, states: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1795
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options)
|
1796
|
+
command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation
|
1797
|
+
command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse
|
1798
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
1799
|
+
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
1800
|
+
command.query['late'] = late unless late.nil?
|
1801
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1802
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1803
|
+
command.query['states'] = states unless states.nil?
|
1804
|
+
command.query['userId'] = user_id unless user_id.nil?
|
1805
|
+
command.query['fields'] = fields unless fields.nil?
|
1806
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1807
|
+
execute_or_queue_command(command, &block)
|
1808
|
+
end
|
1809
|
+
|
1810
|
+
# Modifies attachments of student submission. Attachments may only be added to
|
1811
|
+
# student submissions belonging to course work objects with a `workType` of `
|
1812
|
+
# ASSIGNMENT`. This request must be made by the Developer Console project of the
|
1813
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
1814
|
+
# create the corresponding course work item. This method returns the following
|
1815
|
+
# error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
|
1816
|
+
# access the requested course or course work, if the user is not permitted to
|
1817
|
+
# modify attachments on the requested student submission, or for access errors. *
|
1818
|
+
# `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
1819
|
+
# requested course, course work, or student submission does not exist.
|
1820
|
+
# @param [String] course_id
|
1821
|
+
# Identifier of the course. This identifier can be either the Classroom-assigned
|
1822
|
+
# identifier or an alias.
|
1823
|
+
# @param [String] course_work_id
|
1824
|
+
# Identifier of the course work.
|
1825
|
+
# @param [String] id
|
1826
|
+
# Identifier of the student submission.
|
1827
|
+
# @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object
|
1828
|
+
# @param [String] fields
|
1829
|
+
# Selector specifying which fields to include in a partial response.
|
1830
|
+
# @param [String] quota_user
|
1831
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1832
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1833
|
+
# @param [Google::Apis::RequestOptions] options
|
1834
|
+
# Request-specific options
|
1835
|
+
#
|
1836
|
+
# @yield [result, err] Result & error if block supplied
|
1837
|
+
# @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
|
1838
|
+
# @yieldparam err [StandardError] error object if request failed
|
1839
|
+
#
|
1840
|
+
# @return [Google::Apis::ClassroomV1::StudentSubmission]
|
1841
|
+
#
|
1842
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1843
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1844
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1845
|
+
def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1124
1846
|
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options)
|
1125
1847
|
command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation
|
1126
1848
|
command.request_object = modify_attachments_request_object
|
@@ -1464,13 +2186,70 @@ module Google
|
|
1464
2186
|
execute_or_queue_command(command, &block)
|
1465
2187
|
end
|
1466
2188
|
|
1467
|
-
#
|
1468
|
-
#
|
1469
|
-
#
|
1470
|
-
#
|
1471
|
-
#
|
1472
|
-
#
|
1473
|
-
#
|
2189
|
+
# Gets metadata for Classroom add-ons in the context of a specific post. To
|
2190
|
+
# maintain the integrity of its own data and permissions model, an add-on should
|
2191
|
+
# call this to validate query parameters and the requesting user's role whenever
|
2192
|
+
# the add-on is opened in an [iframe](https://developers.google.com/classroom/
|
2193
|
+
# add-ons/get-started/iframes/iframes-overview). This method returns the
|
2194
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
2195
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
2196
|
+
# identified resources does not exist.
|
2197
|
+
# @param [String] course_id
|
2198
|
+
# Required. Identifier of the course.
|
2199
|
+
# @param [String] item_id
|
2200
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2201
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2202
|
+
# while we are migrating from post_id.
|
2203
|
+
# @param [String] add_on_token
|
2204
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
2205
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. The
|
2206
|
+
# authorization token is required when neither of the following is true: * The
|
2207
|
+
# add-on has attachments on the post. * The developer project issuing the
|
2208
|
+
# request is the same project that created the post.
|
2209
|
+
# @param [String] attachment_id
|
2210
|
+
# Optional. The identifier of the attachment. This field is required for student
|
2211
|
+
# users and optional for teacher users. If not provided in the student case, an
|
2212
|
+
# error is returned.
|
2213
|
+
# @param [String] post_id
|
2214
|
+
# Optional. Deprecated, use item_id instead.
|
2215
|
+
# @param [String] fields
|
2216
|
+
# Selector specifying which fields to include in a partial response.
|
2217
|
+
# @param [String] quota_user
|
2218
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2219
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2220
|
+
# @param [Google::Apis::RequestOptions] options
|
2221
|
+
# Request-specific options
|
2222
|
+
#
|
2223
|
+
# @yield [result, err] Result & error if block supplied
|
2224
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnContext] parsed result object
|
2225
|
+
# @yieldparam err [StandardError] error object if request failed
|
2226
|
+
#
|
2227
|
+
# @return [Google::Apis::ClassroomV1::AddOnContext]
|
2228
|
+
#
|
2229
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2230
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2231
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2232
|
+
def get_course_course_work_material_add_on_context(course_id, item_id, add_on_token: nil, attachment_id: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2233
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnContext', options)
|
2234
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnContext::Representation
|
2235
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnContext
|
2236
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2237
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2238
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
2239
|
+
command.query['attachmentId'] = attachment_id unless attachment_id.nil?
|
2240
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2241
|
+
command.query['fields'] = fields unless fields.nil?
|
2242
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2243
|
+
execute_or_queue_command(command, &block)
|
2244
|
+
end
|
2245
|
+
|
2246
|
+
# Returns a list of course work material that the requester is permitted to view.
|
2247
|
+
# Course students may only view `PUBLISHED` course work material. Course
|
2248
|
+
# teachers and domain administrators may view all course work material. This
|
2249
|
+
# method returns the following error codes: * `PERMISSION_DENIED` if the
|
2250
|
+
# requesting user is not permitted to access the requested course or for access
|
2251
|
+
# errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
2252
|
+
# requested course does not exist.
|
1474
2253
|
# @param [String] course_id
|
1475
2254
|
# Identifier of the course. This identifier can be either the Classroom-assigned
|
1476
2255
|
# identifier or an alias.
|
@@ -1583,6 +2362,671 @@ module Google
|
|
1583
2362
|
execute_or_queue_command(command, &block)
|
1584
2363
|
end
|
1585
2364
|
|
2365
|
+
# Creates an add-on attachment under a post. Requires the add-on to have
|
2366
|
+
# permission to create new attachments on the post. This method returns the
|
2367
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
2368
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
2369
|
+
# identified resources does not exist.
|
2370
|
+
# @param [String] course_id
|
2371
|
+
# Required. Identifier of the course.
|
2372
|
+
# @param [String] item_id
|
2373
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2374
|
+
# to create the attachment. This field is required, but is not marked as such
|
2375
|
+
# while we are migrating from post_id.
|
2376
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
2377
|
+
# @param [String] add_on_token
|
2378
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
2379
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. This
|
2380
|
+
# authorization token is required for in-Classroom attachment creation but
|
2381
|
+
# optional for partner-first attachment creation. Returns an error if not
|
2382
|
+
# provided for partner-first attachment creation and the developer projects that
|
2383
|
+
# created the attachment and its parent stream item do not match.
|
2384
|
+
# @param [String] post_id
|
2385
|
+
# Optional. Deprecated, use item_id instead.
|
2386
|
+
# @param [String] fields
|
2387
|
+
# Selector specifying which fields to include in a partial response.
|
2388
|
+
# @param [String] quota_user
|
2389
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2390
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2391
|
+
# @param [Google::Apis::RequestOptions] options
|
2392
|
+
# Request-specific options
|
2393
|
+
#
|
2394
|
+
# @yield [result, err] Result & error if block supplied
|
2395
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2396
|
+
# @yieldparam err [StandardError] error object if request failed
|
2397
|
+
#
|
2398
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2399
|
+
#
|
2400
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2401
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2402
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2403
|
+
def create_course_course_work_material_add_on_attachment(course_id, item_id, add_on_attachment_object = nil, add_on_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2404
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments', options)
|
2405
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2406
|
+
command.request_object = add_on_attachment_object
|
2407
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2408
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2409
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2410
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2411
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
2412
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2413
|
+
command.query['fields'] = fields unless fields.nil?
|
2414
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2415
|
+
execute_or_queue_command(command, &block)
|
2416
|
+
end
|
2417
|
+
|
2418
|
+
# Deletes an add-on attachment. Requires the add-on to have been the original
|
2419
|
+
# creator of the attachment. This method returns the following error codes: * `
|
2420
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2421
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2422
|
+
# @param [String] course_id
|
2423
|
+
# Required. Identifier of the course.
|
2424
|
+
# @param [String] item_id
|
2425
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2426
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2427
|
+
# while we are migrating from post_id.
|
2428
|
+
# @param [String] attachment_id
|
2429
|
+
# Required. Identifier of the attachment.
|
2430
|
+
# @param [String] post_id
|
2431
|
+
# Optional. Deprecated, use item_id instead.
|
2432
|
+
# @param [String] fields
|
2433
|
+
# Selector specifying which fields to include in a partial response.
|
2434
|
+
# @param [String] quota_user
|
2435
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2436
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2437
|
+
# @param [Google::Apis::RequestOptions] options
|
2438
|
+
# Request-specific options
|
2439
|
+
#
|
2440
|
+
# @yield [result, err] Result & error if block supplied
|
2441
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
2442
|
+
# @yieldparam err [StandardError] error object if request failed
|
2443
|
+
#
|
2444
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
2445
|
+
#
|
2446
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2447
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2448
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2449
|
+
def delete_course_course_work_material_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2450
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}', options)
|
2451
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
2452
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
2453
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2454
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2455
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2456
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2457
|
+
command.query['fields'] = fields unless fields.nil?
|
2458
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2459
|
+
execute_or_queue_command(command, &block)
|
2460
|
+
end
|
2461
|
+
|
2462
|
+
# Returns an add-on attachment. Requires the add-on requesting the attachment to
|
2463
|
+
# be the original creator of the attachment. This method returns the following
|
2464
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
2465
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
2466
|
+
# does not exist.
|
2467
|
+
# @param [String] course_id
|
2468
|
+
# Required. Identifier of the course.
|
2469
|
+
# @param [String] item_id
|
2470
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2471
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2472
|
+
# while we are migrating from post_id.
|
2473
|
+
# @param [String] attachment_id
|
2474
|
+
# Required. Identifier of the attachment.
|
2475
|
+
# @param [String] post_id
|
2476
|
+
# Optional. Deprecated, use item_id instead.
|
2477
|
+
# @param [String] fields
|
2478
|
+
# Selector specifying which fields to include in a partial response.
|
2479
|
+
# @param [String] quota_user
|
2480
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2481
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2482
|
+
# @param [Google::Apis::RequestOptions] options
|
2483
|
+
# Request-specific options
|
2484
|
+
#
|
2485
|
+
# @yield [result, err] Result & error if block supplied
|
2486
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2487
|
+
# @yieldparam err [StandardError] error object if request failed
|
2488
|
+
#
|
2489
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2490
|
+
#
|
2491
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2492
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2493
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2494
|
+
def get_course_course_work_material_add_on_attachment(course_id, item_id, attachment_id, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2495
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}', options)
|
2496
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2497
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2498
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2499
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2500
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2501
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2502
|
+
command.query['fields'] = fields unless fields.nil?
|
2503
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2504
|
+
execute_or_queue_command(command, &block)
|
2505
|
+
end
|
2506
|
+
|
2507
|
+
# Returns all attachments created by an add-on under the post. Requires the add-
|
2508
|
+
# on to have active attachments on the post or have permission to create new
|
2509
|
+
# attachments on the post. This method returns the following error codes: * `
|
2510
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2511
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2512
|
+
# @param [String] course_id
|
2513
|
+
# Required. Identifier of the course.
|
2514
|
+
# @param [String] item_id
|
2515
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial whose
|
2516
|
+
# attachments should be enumerated. This field is required, but is not marked as
|
2517
|
+
# such while we are migrating from post_id.
|
2518
|
+
# @param [Fixnum] page_size
|
2519
|
+
# The maximum number of attachments to return. The service may return fewer than
|
2520
|
+
# this value. If unspecified, at most 20 attachments will be returned. The
|
2521
|
+
# maximum value is 20; values above 20 will be coerced to 20.
|
2522
|
+
# @param [String] page_token
|
2523
|
+
# A page token, received from a previous `ListAddOnAttachments` call. Provide
|
2524
|
+
# this to retrieve the subsequent page. When paginating, all other parameters
|
2525
|
+
# provided to `ListAddOnAttachments` must match the call that provided the page
|
2526
|
+
# token.
|
2527
|
+
# @param [String] post_id
|
2528
|
+
# Optional. Identifier of the post under the course whose attachments to
|
2529
|
+
# enumerate. Deprecated, use item_id instead.
|
2530
|
+
# @param [String] fields
|
2531
|
+
# Selector specifying which fields to include in a partial response.
|
2532
|
+
# @param [String] quota_user
|
2533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2535
|
+
# @param [Google::Apis::RequestOptions] options
|
2536
|
+
# Request-specific options
|
2537
|
+
#
|
2538
|
+
# @yield [result, err] Result & error if block supplied
|
2539
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse] parsed result object
|
2540
|
+
# @yieldparam err [StandardError] error object if request failed
|
2541
|
+
#
|
2542
|
+
# @return [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse]
|
2543
|
+
#
|
2544
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2545
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2546
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2547
|
+
def list_course_course_work_material_add_on_attachments(course_id, item_id, page_size: nil, page_token: nil, post_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2548
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments', options)
|
2549
|
+
command.response_representation = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse::Representation
|
2550
|
+
command.response_class = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse
|
2551
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2552
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2553
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
2554
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2555
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2556
|
+
command.query['fields'] = fields unless fields.nil?
|
2557
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2558
|
+
execute_or_queue_command(command, &block)
|
2559
|
+
end
|
2560
|
+
|
2561
|
+
# Updates an add-on attachment. Requires the add-on to have been the original
|
2562
|
+
# creator of the attachment. This method returns the following error codes: * `
|
2563
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2564
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2565
|
+
# @param [String] course_id
|
2566
|
+
# Required. Identifier of the course.
|
2567
|
+
# @param [String] item_id
|
2568
|
+
# Identifier of the post under which the attachment is attached.
|
2569
|
+
# @param [String] attachment_id
|
2570
|
+
# Required. Identifier of the attachment.
|
2571
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
2572
|
+
# @param [String] post_id
|
2573
|
+
# Required. Identifier of the post under which the attachment is attached.
|
2574
|
+
# @param [String] update_mask
|
2575
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
2576
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
2577
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
2578
|
+
# AddOnAttachment` object. If a field that does not support empty values is
|
2579
|
+
# included in the update mask and not set in the `AddOnAttachment` object, an `
|
2580
|
+
# INVALID_ARGUMENT` error is returned. The following fields may be specified by
|
2581
|
+
# teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `
|
2582
|
+
# student_work_review_uri` * `due_date` * `due_time` * `max_points`
|
2583
|
+
# @param [String] fields
|
2584
|
+
# Selector specifying which fields to include in a partial response.
|
2585
|
+
# @param [String] quota_user
|
2586
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2587
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2588
|
+
# @param [Google::Apis::RequestOptions] options
|
2589
|
+
# Request-specific options
|
2590
|
+
#
|
2591
|
+
# @yield [result, err] Result & error if block supplied
|
2592
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2593
|
+
# @yieldparam err [StandardError] error object if request failed
|
2594
|
+
#
|
2595
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2596
|
+
#
|
2597
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2598
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2599
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2600
|
+
def patch_course_course_work_material_add_on_attachment(course_id, item_id, attachment_id, add_on_attachment_object = nil, post_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2601
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}', options)
|
2602
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2603
|
+
command.request_object = add_on_attachment_object
|
2604
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2605
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2606
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2607
|
+
command.params['itemId'] = item_id unless item_id.nil?
|
2608
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2609
|
+
command.query['postId'] = post_id unless post_id.nil?
|
2610
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
2611
|
+
command.query['fields'] = fields unless fields.nil?
|
2612
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2613
|
+
execute_or_queue_command(command, &block)
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
# Gets metadata for Classroom add-ons in the context of a specific post. To
|
2617
|
+
# maintain the integrity of its own data and permissions model, an add-on should
|
2618
|
+
# call this to validate query parameters and the requesting user's role whenever
|
2619
|
+
# the add-on is opened in an [iframe](https://developers.google.com/classroom/
|
2620
|
+
# add-ons/get-started/iframes/iframes-overview). This method returns the
|
2621
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
2622
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
2623
|
+
# identified resources does not exist.
|
2624
|
+
# @param [String] course_id
|
2625
|
+
# Required. Identifier of the course.
|
2626
|
+
# @param [String] post_id
|
2627
|
+
# Optional. Deprecated, use item_id instead.
|
2628
|
+
# @param [String] add_on_token
|
2629
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
2630
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. The
|
2631
|
+
# authorization token is required when neither of the following is true: * The
|
2632
|
+
# add-on has attachments on the post. * The developer project issuing the
|
2633
|
+
# request is the same project that created the post.
|
2634
|
+
# @param [String] attachment_id
|
2635
|
+
# Optional. The identifier of the attachment. This field is required for student
|
2636
|
+
# users and optional for teacher users. If not provided in the student case, an
|
2637
|
+
# error is returned.
|
2638
|
+
# @param [String] item_id
|
2639
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2640
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2641
|
+
# while we are migrating from post_id.
|
2642
|
+
# @param [String] fields
|
2643
|
+
# Selector specifying which fields to include in a partial response.
|
2644
|
+
# @param [String] quota_user
|
2645
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2646
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2647
|
+
# @param [Google::Apis::RequestOptions] options
|
2648
|
+
# Request-specific options
|
2649
|
+
#
|
2650
|
+
# @yield [result, err] Result & error if block supplied
|
2651
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnContext] parsed result object
|
2652
|
+
# @yieldparam err [StandardError] error object if request failed
|
2653
|
+
#
|
2654
|
+
# @return [Google::Apis::ClassroomV1::AddOnContext]
|
2655
|
+
#
|
2656
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2657
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2658
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2659
|
+
def get_course_post_add_on_context(course_id, post_id, add_on_token: nil, attachment_id: nil, item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2660
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/posts/{postId}/addOnContext', options)
|
2661
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnContext::Representation
|
2662
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnContext
|
2663
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2664
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2665
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
2666
|
+
command.query['attachmentId'] = attachment_id unless attachment_id.nil?
|
2667
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2668
|
+
command.query['fields'] = fields unless fields.nil?
|
2669
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2670
|
+
execute_or_queue_command(command, &block)
|
2671
|
+
end
|
2672
|
+
|
2673
|
+
# Creates an add-on attachment under a post. Requires the add-on to have
|
2674
|
+
# permission to create new attachments on the post. This method returns the
|
2675
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
2676
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
2677
|
+
# identified resources does not exist.
|
2678
|
+
# @param [String] course_id
|
2679
|
+
# Required. Identifier of the course.
|
2680
|
+
# @param [String] post_id
|
2681
|
+
# Optional. Deprecated, use item_id instead.
|
2682
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
2683
|
+
# @param [String] add_on_token
|
2684
|
+
# Optional. Token that authorizes the request. The token is passed as a query
|
2685
|
+
# parameter when the user is redirected from Classroom to the add-on's URL. This
|
2686
|
+
# authorization token is required for in-Classroom attachment creation but
|
2687
|
+
# optional for partner-first attachment creation. Returns an error if not
|
2688
|
+
# provided for partner-first attachment creation and the developer projects that
|
2689
|
+
# created the attachment and its parent stream item do not match.
|
2690
|
+
# @param [String] item_id
|
2691
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2692
|
+
# to create the attachment. This field is required, but is not marked as such
|
2693
|
+
# while we are migrating from post_id.
|
2694
|
+
# @param [String] fields
|
2695
|
+
# Selector specifying which fields to include in a partial response.
|
2696
|
+
# @param [String] quota_user
|
2697
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2698
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2699
|
+
# @param [Google::Apis::RequestOptions] options
|
2700
|
+
# Request-specific options
|
2701
|
+
#
|
2702
|
+
# @yield [result, err] Result & error if block supplied
|
2703
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2704
|
+
# @yieldparam err [StandardError] error object if request failed
|
2705
|
+
#
|
2706
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2707
|
+
#
|
2708
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2709
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2710
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2711
|
+
def create_course_post_add_on_attachment(course_id, post_id, add_on_attachment_object = nil, add_on_token: nil, item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2712
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments', options)
|
2713
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2714
|
+
command.request_object = add_on_attachment_object
|
2715
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2716
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2717
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2718
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2719
|
+
command.query['addOnToken'] = add_on_token unless add_on_token.nil?
|
2720
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2721
|
+
command.query['fields'] = fields unless fields.nil?
|
2722
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2723
|
+
execute_or_queue_command(command, &block)
|
2724
|
+
end
|
2725
|
+
|
2726
|
+
# Deletes an add-on attachment. Requires the add-on to have been the original
|
2727
|
+
# creator of the attachment. This method returns the following error codes: * `
|
2728
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2729
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2730
|
+
# @param [String] course_id
|
2731
|
+
# Required. Identifier of the course.
|
2732
|
+
# @param [String] post_id
|
2733
|
+
# Optional. Deprecated, use item_id instead.
|
2734
|
+
# @param [String] attachment_id
|
2735
|
+
# Required. Identifier of the attachment.
|
2736
|
+
# @param [String] item_id
|
2737
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2738
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2739
|
+
# while we are migrating from post_id.
|
2740
|
+
# @param [String] fields
|
2741
|
+
# Selector specifying which fields to include in a partial response.
|
2742
|
+
# @param [String] quota_user
|
2743
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2744
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2745
|
+
# @param [Google::Apis::RequestOptions] options
|
2746
|
+
# Request-specific options
|
2747
|
+
#
|
2748
|
+
# @yield [result, err] Result & error if block supplied
|
2749
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
2750
|
+
# @yieldparam err [StandardError] error object if request failed
|
2751
|
+
#
|
2752
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
2753
|
+
#
|
2754
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2755
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2756
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2757
|
+
def delete_course_post_add_on_attachment(course_id, post_id, attachment_id, item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2758
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}', options)
|
2759
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
2760
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
2761
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2762
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2763
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2764
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2765
|
+
command.query['fields'] = fields unless fields.nil?
|
2766
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2767
|
+
execute_or_queue_command(command, &block)
|
2768
|
+
end
|
2769
|
+
|
2770
|
+
# Returns an add-on attachment. Requires the add-on requesting the attachment to
|
2771
|
+
# be the original creator of the attachment. This method returns the following
|
2772
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
2773
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
2774
|
+
# does not exist.
|
2775
|
+
# @param [String] course_id
|
2776
|
+
# Required. Identifier of the course.
|
2777
|
+
# @param [String] post_id
|
2778
|
+
# Optional. Deprecated, use item_id instead.
|
2779
|
+
# @param [String] attachment_id
|
2780
|
+
# Required. Identifier of the attachment.
|
2781
|
+
# @param [String] item_id
|
2782
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2783
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2784
|
+
# while we are migrating from post_id.
|
2785
|
+
# @param [String] fields
|
2786
|
+
# Selector specifying which fields to include in a partial response.
|
2787
|
+
# @param [String] quota_user
|
2788
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2789
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2790
|
+
# @param [Google::Apis::RequestOptions] options
|
2791
|
+
# Request-specific options
|
2792
|
+
#
|
2793
|
+
# @yield [result, err] Result & error if block supplied
|
2794
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2795
|
+
# @yieldparam err [StandardError] error object if request failed
|
2796
|
+
#
|
2797
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2798
|
+
#
|
2799
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2800
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2801
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2802
|
+
def get_course_post_add_on_attachment(course_id, post_id, attachment_id, item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2803
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}', options)
|
2804
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2805
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2806
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2807
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2808
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2809
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2810
|
+
command.query['fields'] = fields unless fields.nil?
|
2811
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2812
|
+
execute_or_queue_command(command, &block)
|
2813
|
+
end
|
2814
|
+
|
2815
|
+
# Returns all attachments created by an add-on under the post. Requires the add-
|
2816
|
+
# on to have active attachments on the post or have permission to create new
|
2817
|
+
# attachments on the post. This method returns the following error codes: * `
|
2818
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2819
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2820
|
+
# @param [String] course_id
|
2821
|
+
# Required. Identifier of the course.
|
2822
|
+
# @param [String] post_id
|
2823
|
+
# Optional. Identifier of the post under the course whose attachments to
|
2824
|
+
# enumerate. Deprecated, use item_id instead.
|
2825
|
+
# @param [String] item_id
|
2826
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial whose
|
2827
|
+
# attachments should be enumerated. This field is required, but is not marked as
|
2828
|
+
# such while we are migrating from post_id.
|
2829
|
+
# @param [Fixnum] page_size
|
2830
|
+
# The maximum number of attachments to return. The service may return fewer than
|
2831
|
+
# this value. If unspecified, at most 20 attachments will be returned. The
|
2832
|
+
# maximum value is 20; values above 20 will be coerced to 20.
|
2833
|
+
# @param [String] page_token
|
2834
|
+
# A page token, received from a previous `ListAddOnAttachments` call. Provide
|
2835
|
+
# this to retrieve the subsequent page. When paginating, all other parameters
|
2836
|
+
# provided to `ListAddOnAttachments` must match the call that provided the page
|
2837
|
+
# token.
|
2838
|
+
# @param [String] fields
|
2839
|
+
# Selector specifying which fields to include in a partial response.
|
2840
|
+
# @param [String] quota_user
|
2841
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2842
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2843
|
+
# @param [Google::Apis::RequestOptions] options
|
2844
|
+
# Request-specific options
|
2845
|
+
#
|
2846
|
+
# @yield [result, err] Result & error if block supplied
|
2847
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse] parsed result object
|
2848
|
+
# @yieldparam err [StandardError] error object if request failed
|
2849
|
+
#
|
2850
|
+
# @return [Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse]
|
2851
|
+
#
|
2852
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2853
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2854
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2855
|
+
def list_course_post_add_on_attachments(course_id, post_id, item_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2856
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments', options)
|
2857
|
+
command.response_representation = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse::Representation
|
2858
|
+
command.response_class = Google::Apis::ClassroomV1::ListAddOnAttachmentsResponse
|
2859
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2860
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2861
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2862
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
2863
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2864
|
+
command.query['fields'] = fields unless fields.nil?
|
2865
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2866
|
+
execute_or_queue_command(command, &block)
|
2867
|
+
end
|
2868
|
+
|
2869
|
+
# Updates an add-on attachment. Requires the add-on to have been the original
|
2870
|
+
# creator of the attachment. This method returns the following error codes: * `
|
2871
|
+
# PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
|
2872
|
+
# malformed. * `NOT_FOUND` if one of the identified resources does not exist.
|
2873
|
+
# @param [String] course_id
|
2874
|
+
# Required. Identifier of the course.
|
2875
|
+
# @param [String] post_id
|
2876
|
+
# Required. Identifier of the post under which the attachment is attached.
|
2877
|
+
# @param [String] attachment_id
|
2878
|
+
# Required. Identifier of the attachment.
|
2879
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachment] add_on_attachment_object
|
2880
|
+
# @param [String] item_id
|
2881
|
+
# Identifier of the post under which the attachment is attached.
|
2882
|
+
# @param [String] update_mask
|
2883
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
2884
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
2885
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
2886
|
+
# AddOnAttachment` object. If a field that does not support empty values is
|
2887
|
+
# included in the update mask and not set in the `AddOnAttachment` object, an `
|
2888
|
+
# INVALID_ARGUMENT` error is returned. The following fields may be specified by
|
2889
|
+
# teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `
|
2890
|
+
# student_work_review_uri` * `due_date` * `due_time` * `max_points`
|
2891
|
+
# @param [String] fields
|
2892
|
+
# Selector specifying which fields to include in a partial response.
|
2893
|
+
# @param [String] quota_user
|
2894
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2895
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2896
|
+
# @param [Google::Apis::RequestOptions] options
|
2897
|
+
# Request-specific options
|
2898
|
+
#
|
2899
|
+
# @yield [result, err] Result & error if block supplied
|
2900
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachment] parsed result object
|
2901
|
+
# @yieldparam err [StandardError] error object if request failed
|
2902
|
+
#
|
2903
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachment]
|
2904
|
+
#
|
2905
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2906
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2907
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2908
|
+
def patch_course_post_add_on_attachment(course_id, post_id, attachment_id, add_on_attachment_object = nil, item_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2909
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}', options)
|
2910
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2911
|
+
command.request_object = add_on_attachment_object
|
2912
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachment::Representation
|
2913
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachment
|
2914
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2915
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2916
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2917
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2918
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
2919
|
+
command.query['fields'] = fields unless fields.nil?
|
2920
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2921
|
+
execute_or_queue_command(command, &block)
|
2922
|
+
end
|
2923
|
+
|
2924
|
+
# Returns a student submission for an add-on attachment. This method returns the
|
2925
|
+
# following error codes: * `PERMISSION_DENIED` for access errors. * `
|
2926
|
+
# INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
|
2927
|
+
# identified resources does not exist.
|
2928
|
+
# @param [String] course_id
|
2929
|
+
# Required. Identifier of the course.
|
2930
|
+
# @param [String] post_id
|
2931
|
+
# Optional. Deprecated, use item_id instead.
|
2932
|
+
# @param [String] attachment_id
|
2933
|
+
# Required. Identifier of the attachment.
|
2934
|
+
# @param [String] submission_id
|
2935
|
+
# Required. Identifier of the student’s submission.
|
2936
|
+
# @param [String] item_id
|
2937
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2938
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2939
|
+
# while we are migrating from post_id.
|
2940
|
+
# @param [String] fields
|
2941
|
+
# Selector specifying which fields to include in a partial response.
|
2942
|
+
# @param [String] quota_user
|
2943
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2944
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2945
|
+
# @param [Google::Apis::RequestOptions] options
|
2946
|
+
# Request-specific options
|
2947
|
+
#
|
2948
|
+
# @yield [result, err] Result & error if block supplied
|
2949
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] parsed result object
|
2950
|
+
# @yieldparam err [StandardError] error object if request failed
|
2951
|
+
#
|
2952
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission]
|
2953
|
+
#
|
2954
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2955
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2956
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2957
|
+
def get_course_post_add_on_attachment_student_submission(course_id, post_id, attachment_id, submission_id, item_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2958
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}', options)
|
2959
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
2960
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission
|
2961
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
2962
|
+
command.params['postId'] = post_id unless post_id.nil?
|
2963
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
2964
|
+
command.params['submissionId'] = submission_id unless submission_id.nil?
|
2965
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
2966
|
+
command.query['fields'] = fields unless fields.nil?
|
2967
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2968
|
+
execute_or_queue_command(command, &block)
|
2969
|
+
end
|
2970
|
+
|
2971
|
+
# Updates data associated with an add-on attachment submission. Requires the add-
|
2972
|
+
# on to have been the original creator of the attachment and the attachment to
|
2973
|
+
# have a positive `max_points` value set. This method returns the following
|
2974
|
+
# error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
|
2975
|
+
# the request is malformed. * `NOT_FOUND` if one of the identified resources
|
2976
|
+
# does not exist.
|
2977
|
+
# @param [String] course_id
|
2978
|
+
# Required. Identifier of the course.
|
2979
|
+
# @param [String] post_id
|
2980
|
+
# Optional. Deprecated, use item_id instead.
|
2981
|
+
# @param [String] attachment_id
|
2982
|
+
# Required. Identifier of the attachment.
|
2983
|
+
# @param [String] submission_id
|
2984
|
+
# Required. Identifier of the student's submission.
|
2985
|
+
# @param [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] add_on_attachment_student_submission_object
|
2986
|
+
# @param [String] item_id
|
2987
|
+
# Identifier of the announcement, courseWork, or courseWorkMaterial under which
|
2988
|
+
# the attachment is attached. This field is required, but is not marked as such
|
2989
|
+
# while we are migrating from post_id.
|
2990
|
+
# @param [String] update_mask
|
2991
|
+
# Required. Mask that identifies which fields on the attachment to update. The
|
2992
|
+
# update fails if invalid fields are specified. If a field supports empty values,
|
2993
|
+
# it can be cleared by specifying it in the update mask and not in the `
|
2994
|
+
# AddOnAttachmentStudentSubmission` object. The following fields may be
|
2995
|
+
# specified by teachers: * `points_earned`
|
2996
|
+
# @param [String] fields
|
2997
|
+
# Selector specifying which fields to include in a partial response.
|
2998
|
+
# @param [String] quota_user
|
2999
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
3000
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
3001
|
+
# @param [Google::Apis::RequestOptions] options
|
3002
|
+
# Request-specific options
|
3003
|
+
#
|
3004
|
+
# @yield [result, err] Result & error if block supplied
|
3005
|
+
# @yieldparam result [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission] parsed result object
|
3006
|
+
# @yieldparam err [StandardError] error object if request failed
|
3007
|
+
#
|
3008
|
+
# @return [Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission]
|
3009
|
+
#
|
3010
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3011
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3012
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3013
|
+
def patch_course_post_add_on_attachment_student_submission(course_id, post_id, attachment_id, submission_id, add_on_attachment_student_submission_object = nil, item_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
3014
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}', options)
|
3015
|
+
command.request_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
3016
|
+
command.request_object = add_on_attachment_student_submission_object
|
3017
|
+
command.response_representation = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission::Representation
|
3018
|
+
command.response_class = Google::Apis::ClassroomV1::AddOnAttachmentStudentSubmission
|
3019
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
3020
|
+
command.params['postId'] = post_id unless post_id.nil?
|
3021
|
+
command.params['attachmentId'] = attachment_id unless attachment_id.nil?
|
3022
|
+
command.params['submissionId'] = submission_id unless submission_id.nil?
|
3023
|
+
command.query['itemId'] = item_id unless item_id.nil?
|
3024
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
3025
|
+
command.query['fields'] = fields unless fields.nil?
|
3026
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3027
|
+
execute_or_queue_command(command, &block)
|
3028
|
+
end
|
3029
|
+
|
1586
3030
|
# Adds a user as a student of a course. Domain administrators are permitted to [
|
1587
3031
|
# directly add](https://developers.google.com/classroom/guides/manage-users)
|
1588
3032
|
# users within their domain as students to courses within their domain. Students
|