Klasse GHBranch
java.lang.Object
de.coho04.githubapi.bases.GHBase
de.coho04.githubapi.entities.repositories.GHBranch
- Alle implementierten Schnittstellen:
HttpRequestInterface,JSONHelper
This class represents a GitHub branch.
It provides methods for fetching data about the branch such as its name, commit SHA, commit URL, and protection status.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen de.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T> -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungGHBranch(org.json.JSONObject jsonObject) Constructs a new GHBranch instance with the provided JSON object. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the commit SHA.Returns the commit URL.getName()Returns the branch name.booleanReturns the branch protection status.org.json.JSONObjectConverts this GHBranch instance to a JSONObject.Von Klasse geerbte Methoden de.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrlVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequestVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Konstruktordetails
-
GHBranch
public GHBranch(org.json.JSONObject jsonObject) Constructs a new GHBranch instance with the provided JSON object.- Parameter:
jsonObject- the JSON object containing the branch data
-
-
Methodendetails
-
toJSONObject
public org.json.JSONObject toJSONObject()Converts this GHBranch instance to a JSONObject.- Setzt außer Kraft:
toJSONObjectin KlasseGHBase- Gibt zurück:
- the JSONObject representation of this GHBranch instance
-
getName
Returns the branch name.- Gibt zurück:
- the branch name
-
getCommitSha
Returns the commit SHA.- Gibt zurück:
- the commit SHA
-
getCommitUrl
Returns the commit URL.- Gibt zurück:
- the commit URL
-
isProtected
public boolean isProtected()Returns the branch protection status.- Gibt zurück:
- true if the branch is protected, false otherwise
-