Class GHArtifact

All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHArtifact extends ClassBase
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.
  • 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

      public String getName()
      Returns the name of the artifact.
      Returns:
      the name of the artifact
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
      Returns the update date of the artifact.
      Returns:
      the update date of the artifact
    • getCreatedAt

      public OffsetDateTime 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

      public GHWorkflowRun getWorkflowRun()
      Returns the workflow run of the artifact.
      Returns:
      the workflow run of the artifact
    • getExpiresAt

      public OffsetDateTime getExpiresAt()
      Returns the expiry date of the artifact.
      Returns:
      the expiry date of the artifact
    • getArchiveDownloadUrl

      public String 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