Package org.kohsuke.github
Class GHObject
java.lang.Object
org.kohsuke.github.GHObject
- Direct Known Subclasses:
GHApp
,GHAppInstallation
,GHArtifact
,GHAsset
,GHAuthorization
,GHCheckRun
,GHCheckSuite
,GHCommitComment
,GHCommitStatus
,GHDeployment
,GHDeploymentStatus
,GHDiscussion
,GHGist
,GHHook
,GHInvitation
,GHIssue
,GHIssueComment
,GHLicense
,GHMilestone
,GHPerson
,GHProject
,GHProjectCard
,GHProjectColumn
,GHProjectsV2Item
,GHPullRequestReview
,GHPullRequestReviewComment
,GHReaction
,GHRelease
,GHRepository
,GHRepositoryDiscussion
,GHRepositoryDiscussionComment
,GHRepositoryPublicKey
,GHRepositoryStatistics.CommitActivity
,GHRepositoryStatistics.ContributorStats
,GHRepositoryStatistics.Participation
,GHRequestedAction
,GHTeam
,GHThread
,GHWorkflow
,GHWorkflowJob
,GHWorkflowRun
Most (all?) domain objects in GitHub seems to have these 4 properties.
-
Field Summary
Modifier and TypeFieldDescriptionCapture response HTTP headers on the state object. -
Method Summary
Modifier and TypeMethodDescriptionWhen was this resource created?.abstract URL
Gets html url.long
getId()
Gets id.Get Global node_id from Github object.Deprecated.getRoot()
Deprecated.When was this resource last updated?.getUrl()
Gets url.protected void
setResponseHeaderFields
(GitHubConnectorResponse connectorResponse) Called by Jackson.toString()
String representation to assist debugging and inspection.
-
Field Details
-
responseHeaderFields
Capture response HTTP headers on the state object.
-
-
Method Details
-
setResponseHeaderFields
Called by Jackson.- Parameters:
connectorResponse
- theGitHubConnectorResponse
to get headers from.
-
getResponseHeaderFields
Deprecated.Returns the HTTP response headers given along with the state of this object.Some of the HTTP headers have nothing to do with the object, for example "Cache-Control" and others are different depending on how this object was retrieved.
This method was added as a kind of hack to allow the caller to retrieve OAuth scopes and such. Use with caution. The method might be removed in the future.
- Returns:
- a map of header names to value lists
-
getCreatedAt
@WithBridgeMethods(value=java.lang.String.class, adapterMethod="createdAtStr") public Date getCreatedAt() throws IOExceptionWhen was this resource created?.- Returns:
- date created
- Throws:
IOException
- on error
-
getUrl
Gets url.- Returns:
- API URL of this object.
-
getHtmlUrl
@WithBridgeMethods(value=java.lang.String.class, adapterMethod="urlToString") public abstract URL getHtmlUrl() throws IOExceptionGets html url.- Returns:
- URL of this object for humans, which renders some HTML.
- Throws:
IOException
- on error
-
getUpdatedAt
When was this resource last updated?.- Returns:
- updated date
- Throws:
IOException
- on error
-
getNodeId
Get Global node_id from Github object.- Returns:
- Global Node ID.
- See Also:
-
getId
@WithBridgeMethods(value={java.lang.String.class,int.class}, adapterMethod="longToStringOrInt") public long getId()Gets id.- Returns:
- Unique ID number of this resource.
-
toString
String representation to assist debugging and inspection. The output format of this string is not a committed part of the API and is subject to change. -
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.