Class GHLabel
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.repositories.GHLabel
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub label.
It provides methods for fetching data about the label such as its ID, URL, name, color, node ID, default status, and description.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHLabel
(org.json.JSONObject jsonObject) Constructs a new GHLabel instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Returns the color of the label.Returns the description of the label.int
getId()
Returns the ID of the label.getName()
Returns the name of the label.Returns the node ID of the label.getUrl()
Returns the URL of the label.boolean
Returns whether the label is the default.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl, toJSONObject
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
-
GHLabel
public GHLabel(org.json.JSONObject jsonObject) Constructs a new GHLabel instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the label data
-
-
Method Details
-
getNodeId
Returns the node ID of the label.- Returns:
- the node ID of the label
-
getUrl
Returns the URL of the label.- Returns:
- the URL of the label
-
getId
public int getId()Returns the ID of the label.- Returns:
- the ID of the label
-
getName
Returns the name of the label.- Returns:
- the name of the label
-
getColor
Returns the color of the label.- Returns:
- the color of the label
-
getDescription
Returns the description of the label.- Returns:
- the description of the label
-
isDefault
public boolean isDefault()Returns whether the label is the default.- Returns:
- true if the label is the default, false otherwise
-