Class GHPlan
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHPlan
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub Plan.
It provides methods for fetching data about the plan such as its name, space, private repositories, filled seats, and seats.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHPlan
(org.json.JSONObject jsonObject) Constructs a new GHPlan instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of filled seats of the plan.getName()
Returns the name of the plan.int
Returns the number of private repositories of the plan.int
getSeats()
Returns the number of seats of the plan.long
getSpace()
Returns the space of the plan.org.json.JSONObject
Returns a JSON object representation of the GHPlan instance.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
-
GHPlan
public GHPlan(org.json.JSONObject jsonObject) Constructs a new GHPlan instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the plan data
-
-
Method Details
-
getName
Returns the name of the plan.- Returns:
- the name of the plan
-
getFilledSeats
public int getFilledSeats()Returns the number of filled seats of the plan.- Returns:
- the number of filled seats of the plan
-
getPrivateRepos
public int getPrivateRepos()Returns the number of private repositories of the plan.- Returns:
- the number of private repositories of the plan
-
getSeats
public int getSeats()Returns the number of seats of the plan.- Returns:
- the number of seats of the plan
-
getSpace
public long getSpace()Returns the space of the plan.- Returns:
- the space of the plan
-
toJSONObject
public org.json.JSONObject toJSONObject()Returns a JSON object representation of the GHPlan instance.- Overrides:
toJSONObject
in classGHBase
- Returns:
- a JSON object representation of the GHPlan instance
-