classroom

package
v0.0.0-...-146d575 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package classroom provides access to the Google Classroom API.

Usage example:

import "google.golang.org/api/classroom/v1beta1"
...
classroomService, err := classroom.New(oauthHttpClient)

Index

Constants

View Source
const (
	// Manage your Google Classroom classes
	ClassroomCoursesScope = "https://www.googleapis.com/auth/classroom.courses"

	// View your Google Classroom classes
	ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/classroom.courses.readonly"

	// View the email addresses of people in your classes
	ClassroomProfileEmailsScope = "https://www.googleapis.com/auth/classroom.profile.emails"

	// View the profile photos of people in your classes
	ClassroomProfilePhotosScope = "https://www.googleapis.com/auth/classroom.profile.photos"

	// Manage your Google Classroom class rosters
	ClassroomRostersScope = "https://www.googleapis.com/auth/classroom.rosters"

	// View your Google Classroom class rosters
	ClassroomRostersReadonlyScope = "https://www.googleapis.com/auth/classroom.rosters.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Course

type Course struct {
	// CourseState: State of the course. If unspecified, the default state
	// will be `PROVISIONED`.
	//
	// Possible values:
	//   "COURSE_STATE_UNSPECIFIED"
	//   "ACTIVE"
	//   "ARCHIVED"
	//   "PROVISIONED"
	//   "DECLINED"
	CourseState string `json:"courseState,omitempty"`

	// CreationTime: Creation time of the course. Specifying this field in a
	// course update mask will result in an error. Read-only.
	CreationTime string `json:"creationTime,omitempty"`

	// Description: Optional description. For example, "We'll be learning
	// about about the structure of living creatures from a combination of
	// textbooks, guest lectures, and lab work. Expect to be excited!" If
	// set, this field must be a valid UTF-8 string and no longer than
	// 30,000 characters.
	Description string `json:"description,omitempty"`

	// DescriptionHeading: Optional heading for the description. For
	// example, "Welcome to 10th Grade Biology" If set, this field must be a
	// valid UTF-8 string and no longer than 3600 characters.
	DescriptionHeading string `json:"descriptionHeading,omitempty"`

	// EnrollmentCode: Enrollment code to use when joining this course.
	// Specifying this field in a course update mask will result in an
	// error. Read-only.
	EnrollmentCode string `json:"enrollmentCode,omitempty"`

	// Id: Unique identifier for this course assigned by Classroom. You may
	// optionally set this to an [alias
	// string][google.classroom.v1beta1.CourseAlias] as part of [creating a
	// course][google.classroom.v1beta1.Courses.CreateCourse], creating a
	// corresponding alias. The `ID` cannot be updated after a course is
	// created. Specifying this field in a course update mask will result in
	// an error.
	Id string `json:"id,omitempty"`

	// Name: Name of the course. For example, "10th Grade Biology". This is
	// required and must be between 1 and 750 characters and a valid UTF-8
	// string.
	Name string `json:"name,omitempty"`

	// PrimaryTeacherId: The identifier of the primary teacher of a course.
	// When specified as a parameter of CreateCourseRequest, this field is
	// required. It may be the numeric identifier for the user, or an alias
	// that identifies the teacher. The following aliases are supported: *
	// the e-mail address of the user * the string literal "me",
	// indicating that the requesting user This must be set in a
	// CreateRequest; specifying this field in a course update mask will
	// result in an error.
	PrimaryTeacherId string `json:"primaryTeacherId,omitempty"`

	// Room: Optional room location. For example, "301" If set, this field
	// must be a valid UTF-8 string and no longer than 650 characters.
	Room string `json:"room,omitempty"`

	// Section: Section of the course For example, "Period 2". If set, this
	// field must be a valid UTF-8 string and no longer than 2800
	// characters.
	Section string `json:"section,omitempty"`

	// UpdateTime: Time of the most recent update to this course. Specifying
	// this field in a course update mask will result in an error.
	// Read-only.
	UpdateTime string `json:"updateTime,omitempty"`

	// WebLink: Absolute link to this course in the Classroom web UI.
	// Read-only.
	WebLink string `json:"webLink,omitempty"`
}

Course: A Course in Classroom.

type CourseAlias

type CourseAlias struct {
	// Alias: Alias string. The format of the string indicated the desired
	// alias scoping. * "d:" indicates a domain-scoped alias. Example:
	// d:math_101 * "p:" indicates a project-scoped alias. Example: p:abc123
	// This field has a maximum length of 256 characters.
	Alias string `json:"alias,omitempty"`
}

CourseAlias: Alternative identifier for a course. An alias uniquely identifies a course. It will be unique within one of the following scopes: * domain: A domain-scoped alias is visible to all users within the alias creator's domain and may only be created by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom. * project: A project-scoped alias is visible to any request from an application using the Developer Console Project ID that created the alias and may be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return ALREADY_EXISTS if a previous one has succeeded.

type CoursesAliasesCreateCall

type CoursesAliasesCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesCreateCall) Do

func (*CoursesAliasesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesAliasesDeleteCall

type CoursesAliasesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesDeleteCall) Do

func (c *CoursesAliasesDeleteCall) Do() (*Empty, error)

func (*CoursesAliasesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesAliasesListCall

type CoursesAliasesListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesAliasesListCall) Do

func (*CoursesAliasesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesAliasesListCall) PageSize

func (c *CoursesAliasesListCall) PageSize(pageSize int64) *CoursesAliasesListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.

func (*CoursesAliasesListCall) PageToken

func (c *CoursesAliasesListCall) PageToken(pageToken string) *CoursesAliasesListCall

PageToken sets the optional parameter "pageToken": [nextPageToken][google.classroom.v1beta1.ListCourseAliasesResponse.nex t_page_token] value returned from a previous [list][google.classroom.v1beta1.Courses.ListCourseAliases] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1beta1.Courses.ListCourseAliases] request must be identical to the one which resulted in this token.

type CoursesAliasesService

type CoursesAliasesService struct {
	// contains filtered or unexported fields
}

func NewCoursesAliasesService

func NewCoursesAliasesService(s *Service) *CoursesAliasesService

func (*CoursesAliasesService) Create

func (r *CoursesAliasesService) Create(courseId string, coursealias *CourseAlias) *CoursesAliasesCreateCall

Create: Creates an alias to a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists.

func (*CoursesAliasesService) Delete

func (r *CoursesAliasesService) Delete(courseId string, aliasid string) *CoursesAliasesDeleteCall

Delete: Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias. * `NOT_FOUND` if the alias does not exist.

func (*CoursesAliasesService) List

List: Lists the aliases of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course. * `NOT_FOUND` if the course does not exist.

type CoursesCreateCall

type CoursesCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesCreateCall) Do

func (c *CoursesCreateCall) Do() (*Course, error)

func (*CoursesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesDeleteCall

type CoursesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesDeleteCall) Do

func (c *CoursesDeleteCall) Do() (*Empty, error)

func (*CoursesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesGetCall

type CoursesGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesGetCall) Do

func (c *CoursesGetCall) Do() (*Course, error)

func (*CoursesGetCall) Fields

func (c *CoursesGetCall) Fields(s ...googleapi.Field) *CoursesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesListCall

type CoursesListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesListCall) Do

func (*CoursesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesListCall) PageSize

func (c *CoursesListCall) PageSize(pageSize int64) *CoursesListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.

func (*CoursesListCall) PageToken

func (c *CoursesListCall) PageToken(pageToken string) *CoursesListCall

PageToken sets the optional parameter "pageToken": [nextPageToken][google.classroom.v1beta1.ListCoursesResponse.next_page _token] value returned from a previous [list][google.classroom.v1beta1.Courses.ListCourses] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1beta1.Courses.ListCourses] request must be identical to the one which resulted in this token.

func (*CoursesListCall) StudentId

func (c *CoursesListCall) StudentId(studentId string) *CoursesListCall

StudentId sets the optional parameter "studentId": Restricts returned courses to those having a student with the specified identifier, or an alias that identifies a student. The following aliases are supported: * the e-mail address of the user * the string literal "me", indicating that the requesting user

func (*CoursesListCall) TeacherId

func (c *CoursesListCall) TeacherId(teacherId string) *CoursesListCall

TeacherId sets the optional parameter "teacherId": Restricts returned courses to those having a teacher with the specified identifier, or an alias that identifies a teacher. The following aliases are supported: * the e-mail address of the user * the string literal "me", indicating that the requesting user

type CoursesPatchCall

type CoursesPatchCall struct {
	// contains filtered or unexported fields
}

func (*CoursesPatchCall) Do

func (c *CoursesPatchCall) Do() (*Course, error)

func (*CoursesPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesPatchCall) UpdateMask

func (c *CoursesPatchCall) UpdateMask(updateMask string) *CoursesPatchCall

UpdateMask sets the optional parameter "updateMask": Mask which identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. Valid fields are listed below: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` When set in a query parameter, this should be specified as `updateMask=,,...`

type CoursesService

type CoursesService struct {
	Aliases *CoursesAliasesService

	Students *CoursesStudentsService

	Teachers *CoursesTeachersService
	// contains filtered or unexported fields
}

func NewCoursesService

func NewCoursesService(s *Service) *CoursesService

func (*CoursesService) Create

func (r *CoursesService) Create(course *Course) *CoursesCreateCall

Create: Creates a course. The user specified as the primary teacher in `primary_teacher_id` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses. * `NOT_FOUND` if the primary teacher is not a valid user. * `ALREADY_EXISTS` if an alias was specified and already exists.

func (*CoursesService) Delete

func (r *CoursesService) Delete(id string) *CoursesDeleteCall

Delete: Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course. * `NOT_FOUND` if no course exists with the requested ID.

func (*CoursesService) Get

func (r *CoursesService) Get(id string) *CoursesGetCall

Get: Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course. * `NOT_FOUND` if no course exists with the requested ID.

func (*CoursesService) List

func (r *CoursesService) List() *CoursesListCall

List: Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.

func (*CoursesService) Patch

func (r *CoursesService) Patch(id string, course *Course) *CoursesPatchCall

Patch: Updates one or more fields a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied.

func (*CoursesService) Update

func (r *CoursesService) Update(id string, course *Course) *CoursesUpdateCall

Update: Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course. * `NOT_FOUND` if no course exists with the requested ID.

type CoursesStudentsCreateCall

type CoursesStudentsCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsCreateCall) Do

func (*CoursesStudentsCreateCall) EnrollmentCode

func (c *CoursesStudentsCreateCall) EnrollmentCode(enrollmentCode string) *CoursesStudentsCreateCall

EnrollmentCode sets the optional parameter "enrollmentCode": Enrollment code of the course to create the student in. This is required if [userId][google.classroom.v1beta1.Student.user_id] corresponds to the requesting user; this may be omitted if the requesting user has administrative permissions to create students for any user.

func (*CoursesStudentsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesStudentsDeleteCall

type CoursesStudentsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsDeleteCall) Do

func (*CoursesStudentsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesStudentsGetCall

type CoursesStudentsGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsGetCall) Do

func (c *CoursesStudentsGetCall) Do() (*Student, error)

func (*CoursesStudentsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesStudentsListCall

type CoursesStudentsListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesStudentsListCall) Do

func (*CoursesStudentsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesStudentsListCall) PageSize

func (c *CoursesStudentsListCall) PageSize(pageSize int64) *CoursesStudentsListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

func (*CoursesStudentsListCall) PageToken

func (c *CoursesStudentsListCall) PageToken(pageToken string) *CoursesStudentsListCall

PageToken sets the optional parameter "pageToken": [nextPageToken][google.classroom.v1beta1.ListStudentsResponse.next_pag e_token] value returned from a previous [list][google.classroom.v1beta1.Users.ListStudents] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1beta1.Users.ListStudents] request must be identical to the one which resulted in this token.

type CoursesStudentsService

type CoursesStudentsService struct {
	// contains filtered or unexported fields
}

func NewCoursesStudentsService

func NewCoursesStudentsService(s *Service) *CoursesStudentsService

func (*CoursesStudentsService) Create

func (r *CoursesStudentsService) Create(courseId string, student *Student) *CoursesStudentsCreateCall

Create: Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course. * `NOT_FOUND` if the requested course ID does not exist. * `ALREADY_EXISTS` if the user is already a student or student in the course.

func (*CoursesStudentsService) Delete

func (r *CoursesStudentsService) Delete(courseId string, userId string) *CoursesStudentsDeleteCall

Delete: Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.

func (*CoursesStudentsService) Get

func (r *CoursesStudentsService) Get(courseId string, userId string) *CoursesStudentsGetCall

Get: Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.

func (*CoursesStudentsService) List

List: Returns a list of students of this course that the requester is permitted to view. Fails with `NOT_FOUND` if the course does not exist.

type CoursesTeachersCreateCall

type CoursesTeachersCreateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersCreateCall) Do

func (*CoursesTeachersCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesTeachersDeleteCall

type CoursesTeachersDeleteCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersDeleteCall) Do

func (*CoursesTeachersDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesTeachersGetCall

type CoursesTeachersGetCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersGetCall) Do

func (c *CoursesTeachersGetCall) Do() (*Teacher, error)

func (*CoursesTeachersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type CoursesTeachersListCall

type CoursesTeachersListCall struct {
	// contains filtered or unexported fields
}

func (*CoursesTeachersListCall) Do

func (*CoursesTeachersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CoursesTeachersListCall) PageSize

func (c *CoursesTeachersListCall) PageSize(pageSize int64) *CoursesTeachersListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.

func (*CoursesTeachersListCall) PageToken

func (c *CoursesTeachersListCall) PageToken(pageToken string) *CoursesTeachersListCall

PageToken sets the optional parameter "pageToken": [nextPageToken][google.classroom.v1beta1.ListTeachersResponse.next_pag e_token] value returned from a previous [list][google.classroom.v1beta1.Users.ListTeachers] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1beta1.Users.ListTeachers] request must be identical to the one which resulted in this token.

type CoursesTeachersService

type CoursesTeachersService struct {
	// contains filtered or unexported fields
}

func NewCoursesTeachersService

func NewCoursesTeachersService(s *Service) *CoursesTeachersService

func (*CoursesTeachersService) Create

func (r *CoursesTeachersService) Create(courseId string, teacher *Teacher) *CoursesTeachersCreateCall

Create: Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course. * `NOT_FOUND` if the requested course ID does not exist. * `ALREADY_EXISTS` if the user is already a teacher or student in the course.

func (*CoursesTeachersService) Delete

func (r *CoursesTeachersService) Delete(courseId string, userId string) *CoursesTeachersDeleteCall

Delete: Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.

func (*CoursesTeachersService) Get

func (r *CoursesTeachersService) Get(courseId string, userId string) *CoursesTeachersGetCall

Get: Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.

func (*CoursesTeachersService) List

List: Returns a list of teachers of this course that the requester is permitted to view. Fails with `NOT_FOUND` if the course does not exist.

type CoursesUpdateCall

type CoursesUpdateCall struct {
	// contains filtered or unexported fields
}

func (*CoursesUpdateCall) Do

func (c *CoursesUpdateCall) Do() (*Course, error)

func (*CoursesUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type Empty

type Empty struct {
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.

type GlobalPermission

type GlobalPermission struct {
	// Permission: Permission value.
	//
	// Possible values:
	//   "PERMISSION_UNSPECIFIED"
	//   "CREATE_COURSE"
	Permission string `json:"permission,omitempty"`
}

GlobalPermission: Global user permission description.

type ListCourseAliasesResponse

type ListCourseAliasesResponse struct {
	// Aliases: The course aliases.
	Aliases []*CourseAlias `json:"aliases,omitempty"`

	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`
}

ListCourseAliasesResponse: Response when listing course aliases.

type ListCoursesResponse

type ListCoursesResponse struct {
	// Courses: Courses that match the request.
	Courses []*Course `json:"courses,omitempty"`

	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`
}

ListCoursesResponse: Response when listing courses.

type ListStudentsResponse

type ListStudentsResponse struct {
	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Students: The students who match the list request.
	Students []*Student `json:"students,omitempty"`
}

ListStudentsResponse: Response when listing students.

type ListTeachersResponse

type ListTeachersResponse struct {
	// NextPageToken: Token identifying the next page of results to return.
	// If empty, no further results are available.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Teachers: The teachers who match the list request.
	Teachers []*Teacher `json:"teachers,omitempty"`
}

ListTeachersResponse: Response when listing teachers.

type Name

type Name struct {
	// FamilyName: The user's last name. Read-only
	FamilyName string `json:"familyName,omitempty"`

	// FullName: The user's full name formed by concatenating the first and
	// last name values. Read-only
	FullName string `json:"fullName,omitempty"`

	// GivenName: The user's first name. Read-only
	GivenName string `json:"givenName,omitempty"`
}

Name: Details of the user's name.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Courses *CoursesService

	UserProfiles *UserProfilesService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Student

type Student struct {
	// CourseId: Unique identifier of the course. Read-only
	CourseId string `json:"courseId,omitempty"`

	// Profile: Global user information for the student. Read-only
	Profile *UserProfile `json:"profile,omitempty"`

	// UserId: The identifier of the user. When specified as a parameter of
	// request, this field may be set to an alias that identifies the
	// student. The following are supported: * the e-mail address of the
	// user * the string literal "me", indicating that the requesting user
	UserId string `json:"userId,omitempty"`
}

Student: Student in a course.

type Teacher

type Teacher struct {
	// CourseId: Unique identifier of the course. Read-only
	CourseId string `json:"courseId,omitempty"`

	// Profile: Global user information for the teacher. Read-only
	Profile *UserProfile `json:"profile,omitempty"`

	// UserId: The identifier of the user. When specified as a parameter of
	// request, this field may be set to an alias that identifies the
	// teacher. The following are supported: * the e-mail address of the
	// user * the string literal "me", indicating the requesting user
	UserId string `json:"userId,omitempty"`
}

Teacher: Teacher of a course.

type UserProfile

type UserProfile struct {
	// EmailAddress: E-mail address of the user. Read-only
	EmailAddress string `json:"emailAddress,omitempty"`

	// Id: Unique identifier of the user. Read-only
	Id string `json:"id,omitempty"`

	// Name: Name of the user. Read-only
	Name *Name `json:"name,omitempty"`

	// Permissions: Global permissions of the user. Read-only
	Permissions []*GlobalPermission `json:"permissions,omitempty"`

	// PhotoUrl: Url of user's profile photo. Read-only
	PhotoUrl string `json:"photoUrl,omitempty"`
}

UserProfile: Global information for a user.

type UserProfilesGetCall

type UserProfilesGetCall struct {
	// contains filtered or unexported fields
}

func (*UserProfilesGetCall) Do

func (*UserProfilesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UserProfilesService

type UserProfilesService struct {
	// contains filtered or unexported fields
}

func NewUserProfilesService

func NewUserProfilesService(s *Service) *UserProfilesService

func (*UserProfilesService) Get

Get: Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile. * `NOT_FOUND` if the profile does not exist.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL