Class CoursesResource.CourseWorkMaterialsResource.GetAddOnContextRequest
Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its
own data and permissions model, an add-on should call this to validate query parameters and the
requesting user's role whenever the add-on is opened in an
iframe.
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.CourseWorkMaterialsResource.GetAddOnContextRequest : ClassroomBaseServiceRequest<AddOnContext>, IClientServiceRequest<AddOnContext>, IClientServiceRequest
Constructors
GetAddOnContextRequest(IClientService, string, string)
Constructs a new GetAddOnContext request.
Declaration
public GetAddOnContextRequest(IClientService service, string courseId, string itemId)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service | |
| string | courseId | |
| string | itemId |
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. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post.
Declaration
[RequestParameter("addOnToken", RequestParameterType.Query)]
public virtual string AddOnToken { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AttachmentId
Optional. The identifier of the attachment. This field is required for all requests except when the user is in the Attachment Discovery iframe.
Declaration
[RequestParameter("attachmentId", RequestParameterType.Query)]
public virtual string AttachmentId { 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 the attachment
is attached. This field is required, but is not marked as such while we are migrating from post_id.
Declaration
[RequestParameter("itemId", RequestParameterType.Path)]
public virtual string ItemId { get; }
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.Query)]
public virtual string PostId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
InitParameters()
Initializes GetAddOnContext parameter list.
Declaration
protected override void InitParameters()