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 Portal
      org.jsoup.nodes.Document getAs​(User user, java.lang.String getUrl)
      Preforms a GET request with the authentication cookies of a User object
      void refreshUser​(User user)
      Refreshes the information of a User
      java.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 Portal

        Returns a new User object populated with course information

        Parameters:
        username - Username to login with
        password - Password to login with
        Returns:
        User object
        Throws:
        java.io.IOException - if something goes wrong
        PowerschoolLoginException - 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 wrong
        PowerschoolLoginException - 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 a User object
        Parameters:
        user - User object to utilize
        getUrl - Non-URLified url to get
        Returns:
        Document object from GET request
        See Also:
        Document