Class GHHook

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

public class GHHook extends GHBase
This class represents a GitHub Hook. It provides methods for fetching data about the hook such as its id, url, pingUrl, deliveriesUrl, name, events, active status, config, updatedAt, createdAt, and type.
  • Constructor Details

    • GHHook

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

    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Returns the creation date of the hook.
      Returns:
      the creation date of the hook
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
      Returns the update date of the hook.
      Returns:
      the update date of the hook
    • getName

      public String getName()
      Returns the name of the hook.
      Returns:
      the name of the hook
    • getId

      public int getId()
      Returns the id of the hook.
      Returns:
      the id of the hook
    • getConfig

      public org.json.JSONObject getConfig()
      Returns the config of the hook.
      Returns:
      the config of the hook
    • getEvents

      public List<String> getEvents()
      Returns the events of the hook.
      Returns:
      the events of the hook
    • getDeliveriesUrl

      public String getDeliveriesUrl()
      Returns the deliveries url of the hook.
      Returns:
      the deliveries url of the hook
    • getPingUrl

      public String getPingUrl()
      Returns the ping url of the hook.
      Returns:
      the ping url of the hook
    • getType

      public String getType()
      Returns the type of the hook.
      Returns:
      the type of the hook
    • getUrl

      public String getUrl()
      Returns the url of the hook.
      Returns:
      the url of the hook
    • isActive

      public boolean isActive()
      Returns whether the hook is active.
      Returns:
      whether the hook is active