Package org.dnsge.powerschoolapi.user
Class User
- java.lang.Object
-
- org.dnsge.powerschoolapi.user.User
-
public class User extends java.lang.Object
Class 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 aUserConfig
object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentFetcher
documentFetcher()
Returns aDocumentFetcher
that will perform requests with this User's authentication headersjava.util.Map<java.lang.String,java.lang.String>
getAuth()
PowerschoolClient
getClient()
UserConfig
getConfig()
java.util.List<Course>
getCourses()
java.lang.String
getPersonName()
java.lang.String
getUsername()
CourseGetter
newCourseGetter()
void
update(UserConfig config)
Update fields based off of a config
-
-
-
Constructor Detail
-
User
public User(UserConfig config)
Constructor for a User based off of aUserConfig
object- 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 aDocumentFetcher
that 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:
User
username
-
getConfig
public UserConfig getConfig()
- Returns:
User
UserConfig
- See Also:
UserConfig
-
getClient
public PowerschoolClient getClient()
- Returns:
User
PowerschoolClient
- See Also:
DefaultPowerschoolClient
-
getCourses
public java.util.List<Course> getCourses()
- Returns:
User
courses
-
getPersonName
public java.lang.String getPersonName()
- Returns:
User
name of the person in real life
-
-