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 String
getDescription()
Gets description.List<GHEvent>
getEvents()
Gets events.String
getExternalUrl()
Gets external url.URL
getHtmlUrl()
Gets the html url.GHAppInstallation
getInstallationById(long id)
Obtain an installation associated with this app.GHAppInstallation
getInstallationByOrganization(String name)
Obtain an organization installation associated with this app.GHAppInstallation
getInstallationByRepository(String ownerName, String repositoryName)
Obtain an repository installation associated with this app.GHAppInstallation
getInstallationByUser(String name)
Obtain a user installation associated with this app.long
getInstallationsCount()
Gets installations count.String
getName()
Gets name.GHUser
getOwner()
Gets owner.Map<String,String>
getPermissions()
Gets permissions.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.String
getSlug()
Gets the slug name of the GitHub app.PagedIterable<GHAppInstallation>
listInstallations()
Obtains all the installations associated with this app.void
setDescription(String description)
Deprecated.Do not use this method.void
setEvents(List<GHEvent> events)
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
setName(String name)
Deprecated.Do not use this method.void
setOwner(GHUser owner)
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
-
-
-
-
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:
getHtmlUrl
in 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 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
-
-