Class GHArtifact
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.entities.GHArtifact
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub Artifact.
It provides methods for fetching data about the artifact such as its name, size in bytes, url, archive download url, expired status, creation date, expiry date, update date, and associated workflow run.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHArtifact
(org.json.JSONObject jsonObject) Constructs a new GHArtifact instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the archive download url of the artifact.Returns the creation date of the artifact.Returns the expiry date of the artifact.getName()
Returns the name of the artifact.int
Returns the size in bytes of the artifact.Returns the update date of the artifact.Returns the workflow run of the artifact.boolean
Returns the expired status of the artifact.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrl, toJSONObject
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
-
GHArtifact
public GHArtifact(org.json.JSONObject jsonObject) Constructs a new GHArtifact instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the artifact data
-
-
Method Details
-
getName
Returns the name of the artifact.- Returns:
- the name of the artifact
-
getUpdatedAt
Returns the update date of the artifact.- Returns:
- the update date of the artifact
-
getCreatedAt
Returns the creation date of the artifact.- Returns:
- the creation date of the artifact
-
getSizeInBytes
public int getSizeInBytes()Returns the size in bytes of the artifact.- Returns:
- the size in bytes of the artifact
-
getWorkflowRun
Returns the workflow run of the artifact.- Returns:
- the workflow run of the artifact
-
getExpiresAt
Returns the expiry date of the artifact.- Returns:
- the expiry date of the artifact
-
getArchiveDownloadUrl
Returns the archive download url of the artifact.- Returns:
- the archive download url of the artifact
-
isExpired
public boolean isExpired()Returns the expired status of the artifact.- Returns:
- the expired status of the artifact
-