Package org.kohsuke.github
Class GHApp
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHApp
-
- Direct Known Subclasses:
GHAppFromManifest
public class GHApp extends GHObject
A Github App.- Author:
- Paulo Miguel Almeida
- See Also:
GitHub#getApp()
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHApp()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetDescription()Gets description.List<GHEvent>getEvents()Gets events.StringgetExternalUrl()Gets external url.URLgetHtmlUrl()Gets the html url.GHAppInstallationgetInstallationById(long id)Obtain an installation associated with this app.GHAppInstallationgetInstallationByOrganization(String name)Obtain an organization installation associated with this app.GHAppInstallationgetInstallationByRepository(String ownerName, String repositoryName)Obtain an repository installation associated with this app.GHAppInstallationgetInstallationByUser(String name)Obtain a user installation associated with this app.longgetInstallationsCount()Gets installations count.StringgetName()Gets name.GHUsergetOwner()Gets owner.Map<String,String>getPermissions()Gets permissions.GitHubgetRoot()Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.StringgetSlug()Gets the slug name of the GitHub app.PagedIterable<GHAppInstallation>listInstallations()Obtains all the installations associated with this app.voidsetDescription(String description)Deprecated.Do not use this method.voidsetEvents(List<GHEvent> events)Deprecated.Do not use this method.voidsetExternalUrl(String externalUrl)Deprecated.Do not use this method.voidsetInstallationsCount(long installationsCount)Deprecated.Do not use this method.voidsetName(String name)Deprecated.Do not use this method.voidsetOwner(GHUser owner)Deprecated.Do not use this method.voidsetPermissions(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
-
-
-
-
Method Detail
-
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
-
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:
getHtmlUrlin classGHObject- 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:
- List installations
-
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:
- Get an installation
-
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:
- Get an organization installation
-
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:
- Get a repository installation
-
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:
- Get a user installation
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.Get the rootGitHubinstance for this object.- Returns:
- the root
GitHubinstance
-
-