Package org.dnsge.powerschoolapi.client
Interface PowerschoolClient
-
- All Known Implementing Classes:
DefaultPowerschoolClient
public interface PowerschoolClientInterface that defines a client to interface with a Powerschool Portal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Userauthenticate(java.lang.String username, java.lang.String password)Logs in a user to a Powerschool Student Portalorg.jsoup.nodes.DocumentgetAs(User user, java.lang.String getUrl)Preforms a GET request with the authentication cookies of aUserobjectvoidrefreshUser(User user)Refreshes the information of a Userjava.lang.Stringurlify(java.lang.String extension)Generates a complete URL from the base install url
-
-
-
Method Detail
-
urlify
java.lang.String urlify(java.lang.String extension)
Generates a complete URL from the base install url- Parameters:
extension- Extension of the base install url- Returns:
- Extended URL
-
authenticate
User authenticate(java.lang.String username, java.lang.String password) throws java.io.IOException
Logs in a user to a Powerschool Student PortalReturns a new
Userobject populated with course information- Parameters:
username- Username to login withpassword- Password to login with- Returns:
Userobject- Throws:
java.io.IOException- if something goes wrongPowerschoolLoginException- if invalid username/password
-
refreshUser
void refreshUser(User user) throws java.io.IOException
Refreshes the information of a User- Parameters:
user- User to update- Throws:
java.io.IOException- if something goes wrongPowerschoolLoginException- if invalid username/password
-
getAs
org.jsoup.nodes.Document getAs(User user, java.lang.String getUrl)
Preforms a GET request with the authentication cookies of aUserobject- Parameters:
user- User object to utilizegetUrl- Non-URLified url to get- Returns:
Documentobject from GET request- See Also:
Document
-
-