Class CoursesResource.PostsResource.AddOnAttachmentsResource.CreateRequest
Creates an add-on attachment under a post. Requires the add-on to have permission to create new
attachments on the post. This method returns the following error codes: * PERMISSION_DENIED
for
access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if one of the
identified resources does not exist.
Inheritance
Inherited Members
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class CoursesResource.PostsResource.AddOnAttachmentsResource.CreateRequest : ClassroomBaseServiceRequest<AddOnAttachment>, IClientServiceRequest<AddOnAttachment>, IClientServiceRequest
Constructors
CreateRequest(IClientService, AddOnAttachment, string, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, AddOnAttachment body, string courseId, string postId)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
AddOnAttachment | body | |
string | courseId | |
string | postId |
Properties
AddOnToken
Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match.
Declaration
[RequestParameter("addOnToken", RequestParameterType.Query)]
public virtual string AddOnToken { get; set; }
Property Value
Type | Description |
---|---|
string |
CourseId
Required. Identifier of the course.
Declaration
[RequestParameter("courseId", RequestParameterType.Path)]
public virtual string CourseId { get; }
Property Value
Type | Description |
---|---|
string |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ItemId
Identifier of the Announcement
, CourseWork
, or CourseWorkMaterial
under which to create
the attachment. This field is required, but is not marked as such while we are migrating from
post_id.
Declaration
[RequestParameter("itemId", RequestParameterType.Query)]
public virtual string ItemId { get; set; }
Property Value
Type | Description |
---|---|
string |
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
PostId
Optional. Deprecated, use item_id
instead.
Declaration
[RequestParameter("postId", RequestParameterType.Path)]
public virtual string PostId { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()