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()
  • Method Details

    • getOwner

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

      @Deprecated public void setOwner(GHUser owner)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets owner.
      Parameters:
      owner - 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
    • setName

      @Deprecated public void setName(String name)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets name.
      Parameters:
      name - the name
    • getDescription

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

      @Deprecated public void setDescription(String description)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets description.
      Parameters:
      description - the description
    • getExternalUrl

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

      @Deprecated public void setExternalUrl(String externalUrl)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets external url.
      Parameters:
      externalUrl - the external url
    • getEvents

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

      @Deprecated public void setEvents(List<GHEvent> events)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets events.
      Parameters:
      events - the events
    • getInstallationsCount

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

      @Deprecated public void setInstallationsCount(long installationsCount)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets installations count.
      Parameters:
      installationsCount - the installations count
    • getHtmlUrl

      public URL getHtmlUrl()
      Gets the html url.
      Specified by:
      getHtmlUrl in class GHObject
      Returns:
      the html url
    • getPermissions

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

      @Deprecated public void setPermissions(Map<String,String> permissions)
      Deprecated.
      Do not use this method. It was added due to incomplete understanding of Jackson binding.
      Sets permissions.
      Parameters:
      permissions - the permissions
    • listInstallations

      @Preview(MACHINE_MAN) 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

      @Preview(MACHINE_MAN) 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

      @Preview(MACHINE_MAN) 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

      @Preview(MACHINE_MAN) 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

      @Preview(MACHINE_MAN) 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

      @Preview(MACHINE_MAN) 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:
    • getRoot

      @Deprecated public GitHub getRoot()
      Deprecated.
      For access to the GitHub instance, use a local copy instead of pulling it out of objects.
      Get the root GitHub instance for this object.
      Returns:
      the root GitHub instance