Class GHEventInfo


  • public class GHEventInfo
    extends Object
    Represents an event.
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • GHEventInfo

        public GHEventInfo()
    • Method Detail

      • getType

        public GHEvent getType()
        Gets type.
        Returns:
        the type
      • getId

        public long getId()
        Gets id.
        Returns:
        the id
      • getCreatedAt

        public Date getCreatedAt()
        Gets created at.
        Returns:
        the created at
      • getActorLogin

        public String getActorLogin()
                             throws IOException
        Gets actor login.
        Returns:
        the login of the actor.
        Throws:
        IOException - on error
      • getPayload

        public <T extends GHEventPayload> T getPayload​(Class<T> type)
                                                throws IOException
        Retrieves the payload.
        Type Parameters:
        T - the type parameter
        Parameters:
        type - Specify one of the GHEventPayload subtype that defines a type-safe access to the payload. This must match the event type.
        Returns:
        parsed event payload
        Throws:
        IOException - if payload cannot be parsed
      • getRoot

        @Deprecated
        public GitHub getRoot()
        Deprecated.
        For access to the GitHub instance, use a local copy instead of pulling it out of objects.
        Get the root GitHub instance for this object.
        Returns:
        the root GitHub instance