Package io.github.coho04.githubapi.bases
Class ClassBase
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
- Direct Known Subclasses:
EntityBase
,GHArtifact
,GHIssue
,GHMilestone
,GHPackage
,GHProject
,GHPullRequest
,GHRepository
,GHTeam
,GHWorkflowJob
ClassBase is a class that extends GHBase. It represents a base class for GitHub objects.
It contains several properties such as id, nodeId, htmlUrl, url, and eventsUrl.
These properties are initialized through a JSONObject.
- Since:
- 2024-1.2
- Version:
- 1.0
- Author:
- Coho04
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionClassBase
(org.json.JSONObject jsonObject) Constructs a new ClassBase object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the eventsUrl of this ClassBase object.Returns the htmlUrl of this ClassBase object.int
getId()
Returns the id of this ClassBase object.Returns the nodeId of this ClassBase object.getUrl()
Returns the url of this ClassBase object.org.json.JSONObject
Converts this ClassBase object to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
ClassBase
public ClassBase(org.json.JSONObject jsonObject) Constructs a new ClassBase object.- Parameters:
jsonObject
- a JSONObject containing the data for initializing the ClassBase object.
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Converts this ClassBase object to a JSONObject.- Overrides:
toJSONObject
in classGHBase
- Returns:
- a JSONObject representation of this ClassBase object.
-
getNodeId
Returns the nodeId of this ClassBase object.- Returns:
- the nodeId of this ClassBase object.
-
getHtmlUrl
Returns the htmlUrl of this ClassBase object.- Returns:
- the htmlUrl of this ClassBase object.
-
getUrl
Returns the url of this ClassBase object.- Returns:
- the url of this ClassBase object.
-
getEventsUrl
Returns the eventsUrl of this ClassBase object.- Returns:
- the eventsUrl of this ClassBase object.
-
getId
public int getId()Returns the id of this ClassBase object.- Returns:
- the id of this ClassBase object.
-