Class GHApp

Direct Known Subclasses:
GHAppFromManifest

public class GHApp extends GHObject
A Github App.
Author:
Paulo Miguel Almeida
See Also:
  • Constructor Details

    • GHApp

      public GHApp()
      Create default GHApp instance
  • Method Details

    • getOwner

      public GHUser getOwner()
      Gets owner.
      Returns:
      the owner
    • getName

      public String getName()
      Gets name.
      Returns:
      the name
    • getSlug

      public String getSlug()
      Gets the slug name of the GitHub app.
      Returns:
      the slug name of the GitHub app
    • getDescription

      public String getDescription()
      Gets description.
      Returns:
      the description
    • getExternalUrl

      public String getExternalUrl()
      Gets external url.
      Returns:
      the external url
    • getEvents

      public List<GHEvent> getEvents()
      Gets events.
      Returns:
      the events
    • getInstallationsCount

      public long getInstallationsCount()
      Gets installations count.
      Returns:
      the installations count
    • getHtmlUrl

      public URL getHtmlUrl()
      Gets the html url.
      Returns:
      the html url
    • getPermissions

      public Map<String,String> getPermissions()
      Gets permissions.
      Returns:
      the permissions
    • listInstallations

      public PagedIterable<GHAppInstallation> listInstallations()
      Obtains all the installations associated with this app.

      You must use a JWT to access this endpoint.

      Returns:
      a list of App installations
      See Also:
    • listInstallations

      public PagedIterable<GHAppInstallation> listInstallations(Date since)
      Obtains all the installations associated with this app since a given date.

      You must use a JWT to access this endpoint.

      Parameters:
      since - - Allows users to get installations that have been updated since a given date.
      Returns:
      a list of App installations since a given time.
      See Also:
    • getInstallationById

      public GHAppInstallation getInstallationById(long id) throws IOException
      Obtain an installation associated with this app.

      You must use a JWT to access this endpoint.

      Parameters:
      id - Installation Id
      Returns:
      a GHAppInstallation
      Throws:
      IOException - on error
      See Also:
    • getInstallationByOrganization

      public GHAppInstallation getInstallationByOrganization(String name) throws IOException
      Obtain an organization installation associated with this app.

      You must use a JWT to access this endpoint.

      Parameters:
      name - Organization name
      Returns:
      a GHAppInstallation
      Throws:
      IOException - on error
      See Also:
    • getInstallationByRepository

      public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException
      Obtain an repository installation associated with this app.

      You must use a JWT to access this endpoint.

      Parameters:
      ownerName - Organization or user name
      repositoryName - Repository name
      Returns:
      a GHAppInstallation
      Throws:
      IOException - on error
      See Also:
    • getInstallationByUser

      public GHAppInstallation getInstallationByUser(String name) throws IOException
      Obtain a user installation associated with this app.

      You must use a JWT to access this endpoint.

      Parameters:
      name - user name
      Returns:
      a GHAppInstallation
      Throws:
      IOException - on error
      See Also: