Class GHEvent

java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHEvent
All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHEvent extends GHBase
This class represents a GitHub Event. It provides methods for fetching data about the event such as its id, type, actor, repo, payload, public status, and creation date.
  • Constructor Details

    • GHEvent

      public GHEvent(org.json.JSONObject jsonObject)
      Constructs a new GHEvent instance with the provided JSON object.
      Parameters:
      jsonObject - the JSON object containing the event data
  • Method Details

    • getType

      public String getType()
      Returns the type of the event.
      Returns:
      the type of the event
    • getActor

      public org.json.JSONObject getActor()
      Returns the actor of the event.
      Returns:
      the actor of the event
    • getPayload

      public org.json.JSONObject getPayload()
      Returns the payload of the event.
      Returns:
      the payload of the event
    • getRepo

      public org.json.JSONObject getRepo()
      Returns the repo of the event.
      Returns:
      the repo of the event
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Returns the creation date of the event.
      Returns:
      the creation date of the event
    • getId

      public String getId()
      Returns the id of the event.
      Returns:
      the id of the event
    • isPublic

      public boolean isPublic()
      Returns whether the event is public.
      Returns:
      whether the event is public