Package org.dnsge.powerschoolapi.user
Class User
- java.lang.Object
-
- org.dnsge.powerschoolapi.user.User
-
public class User extends java.lang.ObjectClass that represents a logged in Powerschool user- Version:
- 1.0.3
-
-
Constructor Summary
Constructors Constructor Description User(UserConfig config)Constructor for a User based off of aUserConfigobject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentFetcherdocumentFetcher()Returns aDocumentFetcherthat will perform requests with this User's authentication headersjava.util.Map<java.lang.String,java.lang.String>getAuth()PowerschoolClientgetClient()UserConfiggetConfig()java.util.List<Course>getCourses()java.lang.StringgetPersonName()java.lang.StringgetUsername()CourseGetternewCourseGetter()voidupdate(UserConfig config)Update fields based off of a config
-
-
-
Constructor Detail
-
User
public User(UserConfig config)
Constructor for a User based off of aUserConfigobject- Parameters:
config- UserConfig to base the User off of- See Also:
UserConfig
-
-
Method Detail
-
update
public void update(UserConfig config)
Update fields based off of a config- Parameters:
config- UserConfig to update from
-
getAuth
public java.util.Map<java.lang.String,java.lang.String> getAuth()
- Returns:
- Authentication Cookies for this User
-
documentFetcher
public DocumentFetcher documentFetcher()
Returns aDocumentFetcherthat will perform requests with this User's authentication headers- Returns:
- Document from GET request
- See Also:
DefaultPowerschoolClient.getAs(User, String)
-
newCourseGetter
public CourseGetter newCourseGetter()
- Returns:
- New CourseGetter based off of this User's courses
-
getUsername
public java.lang.String getUsername()
- Returns:
Userusername
-
getConfig
public UserConfig getConfig()
- Returns:
UserUserConfig- See Also:
UserConfig
-
getClient
public PowerschoolClient getClient()
- Returns:
UserPowerschoolClient- See Also:
DefaultPowerschoolClient
-
getCourses
public java.util.List<Course> getCourses()
- Returns:
Usercourses
-
getPersonName
public java.lang.String getPersonName()
- Returns:
Username of the person in real life
-
-