UVACanvasAccess
Public Member Functions | Properties | List of all members
UVACanvasAccess.Structures.Users.User Class Reference

Represents a user. More...

Inheritance diagram for UVACanvasAccess.Structures.Users.User:
Inheritance graph
[legend]
Collaboration diagram for UVACanvasAccess.Structures.Users.User:
Collaboration graph
[legend]

Public Member Functions

string ToPrettyString ()
 Returns a pretty, formatted string representation of the object.
 
Task< ProfileGetProfile ()
 Returns this user's profile. More...
 
IAsyncEnumerable< PageViewStreamPageViews (DateTime? startTime=null, DateTime? endTime=null)
 Streams this user's page view history. Page views are returned in descending order; newest to oldest. More...
 
async ValueTask< bool > IsTeacher (bool currentCoursesOnly=false)
 Returns whether or not this user is a teacher. Specifically, whether or not this user has enrolled with the Teacher role in at least one course. More...
 
IAsyncEnumerable< EnrollmentStreamEnrollments (IEnumerable< CourseEnrollmentRoleTypes > types=null, IEnumerable< CourseEnrollmentState > states=null, CourseEnrollmentIncludes? includes=null)
 Streams all enrollments for this user. More...
 

Properties

ulong Id [get]
 The user's unique id. More...
 
string Name [get, set]
 
string SortableName [get, set]
 
string ShortName [get, set]
 
string SisUserId [get]
 
ulong? SisImportId [get]
 
string IntegrationId [get]
 
string LoginId [get]
 
string AvatarUrl [get]
 
IEnumerable< EnrollmentEnrollments [get]
 
string Email [get]
 
string Locale [get]
 
string EffectiveLocale [get]
 
DateTime? LastLogin [get]
 
string TimeZone [get, set]
 
string Bio [get, set]
 
Dictionary< string, bool > Permissions [get]
 

Detailed Description

Represents a user.

Member Function Documentation

◆ GetProfile()

Task<Profile> UVACanvasAccess.Structures.Users.User.GetProfile ( )
inline

Returns this user's profile.

Returns
The profile.

◆ IsTeacher()

async ValueTask<bool> UVACanvasAccess.Structures.Users.User.IsTeacher ( bool  currentCoursesOnly = false)
inline

Returns whether or not this user is a teacher. Specifically, whether or not this user has enrolled with the Teacher role in at least one course.

Parameters
currentCoursesOnlyIf true, this user is only considered a teacher if he is enrolled as a teacher in a currently active course.
Returns
Whether or not this user is a teacher.

◆ StreamEnrollments()

IAsyncEnumerable<Enrollment> UVACanvasAccess.Structures.Users.User.StreamEnrollments ( IEnumerable< CourseEnrollmentRoleTypes >  types = null,
IEnumerable< CourseEnrollmentState >  states = null,
CourseEnrollmentIncludes?  includes = null 
)
inline

Streams all enrollments for this user.

Parameters
types(Optional) The set of enrollment types to filter by.
states(Optional) The set of enrollment states to filter by.
includes(Optional) Data to include in the result.
Returns
The stream of enrollments.

◆ StreamPageViews()

IAsyncEnumerable<PageView> UVACanvasAccess.Structures.Users.User.StreamPageViews ( DateTime?  startTime = null,
DateTime?  endTime = null 
)
inline

Streams this user's page view history. Page views are returned in descending order; newest to oldest.

Parameters
startTimeThe beginning of the date-time range to retrieve page views from. Defaults to unbounded.
endTimeThe end of the date-time range to retrieve page views from. Defaults to unbounded.
Returns
The stream of page views.

Property Documentation

◆ Id

ulong UVACanvasAccess.Structures.Users.User.Id
get

The user's unique id.


The documentation for this class was generated from the following file: