java.lang.Object
org.kohsuke.github.GHEventInfo
Represents an event.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Inside the event JSON model, GitHub uses a slightly different format. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetActor()
Gets actor.Gets actor login.Gets created at.long
getId()
Gets id.Gets organization.<T extends GHEventPayload>
TgetPayload
(Class<T> type) Retrieves the payload.Gets repository.getType()
Gets type.
-
Constructor Details
-
GHEventInfo
public GHEventInfo()Create default GHEventInfo instance
-
-
Method Details
-
getType
Gets type.- Returns:
- the type
-
getId
public long getId()Gets id.- Returns:
- the id
-
getCreatedAt
Gets created at.- Returns:
- the created at
-
getRepository
Gets repository.- Returns:
- Repository where the change was made.
- Throws:
IOException
- on error
-
getActor
Gets actor.- Returns:
- the
GHUser
actor for this event. - Throws:
IOException
- on error
-
getActorLogin
Gets actor login.- Returns:
- the login of the actor.
- Throws:
IOException
- on error
-
getOrganization
Gets organization.- Returns:
- the organization
- Throws:
IOException
- the io exception
-
getPayload
Retrieves the payload.- Type Parameters:
T
- the type parameter- Parameters:
type
- Specify one of theGHEventPayload
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
-