Class GHMilestone
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.entities.repositories.GHMilestone
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub milestone.
It provides methods for fetching data about the milestone such as its number, title, due date, state, creator, open issues, closed issues, labels URL, and description.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHMilestone
(Github github, org.json.JSONObject jsonObject) Constructs a new GHMilestone instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the date and time when the milestone was closed.int
Returns the number of closed issues in the milestone.Returns the date and time when the milestone was created.Returns the user who created the milestone.Returns the description of the milestone.getDueOn()
Returns the due date of the milestone.Returns the URL of the milestone labels.int
Returns the number of the milestone.int
Returns the number of open issues in the milestone.getState()
Returns the state of the milestone.getTitle()
Returns the title of the milestone.Returns the date and time when the milestone was last updated.org.json.JSONObject
Converts this ClassBase object to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrl
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
-
GHMilestone
Constructs a new GHMilestone instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the milestone data
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Description copied from class:ClassBase
Converts this ClassBase object to a JSONObject.- Overrides:
toJSONObject
in classClassBase
- Returns:
- a JSONObject representation of this ClassBase object.
-
getDescription
Returns the description of the milestone.- Returns:
- the description of the milestone
-
getUpdatedAt
Returns the date and time when the milestone was last updated.- Returns:
- the date and time when the milestone was last updated
-
getLabelsUrl
Returns the URL of the milestone labels.- Returns:
- the URL of the milestone labels
-
getTitle
Returns the title of the milestone.- Returns:
- the title of the milestone
-
getCreatedAt
Returns the date and time when the milestone was created.- Returns:
- the date and time when the milestone was created
-
getClosedAt
Returns the date and time when the milestone was closed.- Returns:
- the date and time when the milestone was closed
-
getNumber
public int getNumber()Returns the number of the milestone.- Returns:
- the number of the milestone
-
getState
Returns the state of the milestone.- Returns:
- the state of the milestone
-
getCreator
Returns the user who created the milestone.- Returns:
- the user who created the milestone
-
getClosedIssues
public int getClosedIssues()Returns the number of closed issues in the milestone.- Returns:
- the number of closed issues in the milestone
-
getOpenIssues
public int getOpenIssues()Returns the number of open issues in the milestone.- Returns:
- the number of open issues in the milestone
-
getDueOn
Returns the due date of the milestone.- Returns:
- the due date of the milestone
-