Package org.kohsuke.github
Class GHApp
java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHApp
- Direct Known Subclasses:
GHAppFromManifest
A Github App.
- Author:
- Paulo Miguel Almeida
- See Also:
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets description.Gets events.Gets external url.Gets the html url.getInstallationById
(long id) Obtain an installation associated with this app.Obtain an organization installation associated with this app.getInstallationByRepository
(String ownerName, String repositoryName) Obtain an repository installation associated with this app.getInstallationByUser
(String name) Obtain a user installation associated with this app.long
Gets installations count.getName()
Gets name.getOwner()
Gets owner.Gets permissions.getRoot()
Deprecated.getSlug()
Gets the slug name of the GitHub app.Obtains all the installations associated with this app.listInstallations
(Date since) Obtains all the installations associated with this app since a given date.void
setDescription
(String description) Deprecated.Do not use this method.void
Deprecated.Do not use this method.void
setExternalUrl
(String externalUrl) Deprecated.Do not use this method.void
setInstallationsCount
(long installationsCount) Deprecated.Do not use this method.void
Deprecated.Do not use this method.void
Deprecated.Do not use this method.void
setPermissions
(Map<String, String> permissions) Deprecated.Do not use this method.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Constructor Details
-
GHApp
public GHApp()
-
-
Method Details
-
getOwner
Gets owner.- Returns:
- the owner
-
setOwner
Deprecated.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets owner.- Parameters:
owner
- the owner
-
getName
Gets name.- Returns:
- the name
-
getSlug
Gets the slug name of the GitHub app.- Returns:
- the slug name of the GitHub app
-
setName
Deprecated.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets name.- Parameters:
name
- the name
-
getDescription
Gets description.- Returns:
- the description
-
setDescription
Deprecated.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets description.- Parameters:
description
- the description
-
getExternalUrl
Gets external url.- Returns:
- the external url
-
setExternalUrl
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
Gets events.- Returns:
- the events
-
setEvents
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.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets installations count.- Parameters:
installationsCount
- the installations count
-
getHtmlUrl
Gets the html url.- Specified by:
getHtmlUrl
in classGHObject
- Returns:
- the html url
-
getPermissions
Gets permissions.- Returns:
- the permissions
-
setPermissions
Deprecated.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets permissions.- Parameters:
permissions
- the permissions
-
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
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
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 namerepositoryName
- 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.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
GitHub
instance, use a local copy instead of pulling it out of objects.