Package org.dnsge.powerschoolapi.client
Interface PowerschoolClient
-
- All Known Implementing Classes:
DefaultPowerschoolClient
public interface PowerschoolClient
Interface that defines a client to interface with a Powerschool Portal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description User
authenticate(java.lang.String username, java.lang.String password)
Logs in a user to a Powerschool Student Portalorg.jsoup.nodes.Document
getAs(User user, java.lang.String getUrl)
Preforms a GET request with the authentication cookies of aUser
objectvoid
refreshUser(User user)
Refreshes the information of a Userjava.lang.String
urlify(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
User
object populated with course information- Parameters:
username
- Username to login withpassword
- Password to login with- Returns:
User
object- 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 aUser
object- Parameters:
user
- User object to utilizegetUrl
- Non-URLified url to get- Returns:
Document
object from GET request- See Also:
Document
-
-