Interface WebhookResource
@Path("/{version}/webhooks")
public interface WebhookResource
-
Method Summary
Modifier and TypeMethodDescriptionorg.oxerr.viagogo.model.response.webhook.Webhook
createWebhook
(org.oxerr.viagogo.model.response.webhook.Webhook webhook) void
deleteWebhook
(Integer webhookId) org.oxerr.viagogo.model.response.webhook.Webhook
getWebhook
(Integer webhookId) org.oxerr.viagogo.model.response.webhook.Webhooks
getWebhooks
(Integer page, Integer pageSize, String sort) void
org.oxerr.viagogo.model.response.webhook.Webhook
updateWebhook
(Integer webhookId, org.oxerr.viagogo.model.response.webhook.Webhook webhook)
-
Method Details
-
getWebhooks
@GET @Produces("application/json") @Consumes("application/json") org.oxerr.viagogo.model.response.webhook.Webhooks getWebhooks(@QueryParam("page") Integer page, @QueryParam("page_size") Integer pageSize, @QueryParam("sort") String sort) throws IOException, ViagogoException List webhooksList webhooks for the authenticated user.
- Parameters:
page
- Specifies which page of data to retrieve.pageSize
- Set custom page sizes on response.sort
- Determines the ordering of items. A comma-separated string containingresource_version
.- Returns:
- all webhooks on the viagogo platform.
- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-
createWebhook
@POST @Produces("application/json") @Consumes("application/json") org.oxerr.viagogo.model.response.webhook.Webhook createWebhook(org.oxerr.viagogo.model.response.webhook.Webhook webhook) throws IOException, ViagogoException - Parameters:
webhook
- the webhook.- Returns:
- the created webhook.
- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-
getWebhook
@GET @Path("/{webhookId}") org.oxerr.viagogo.model.response.webhook.Webhook getWebhook(@PathParam("webhookId") Integer webhookId) throws IOException, ViagogoException - Parameters:
webhookId
- the webhook ID.- Returns:
- the webhook.
- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-
updateWebhook
@PATCH @Path("/{webhookId}") @Produces("application/json") @Consumes("application/json") org.oxerr.viagogo.model.response.webhook.Webhook updateWebhook(@PathParam("webhookId") Integer webhookId, org.oxerr.viagogo.model.response.webhook.Webhook webhook) throws IOException, ViagogoException - Parameters:
webhookId
- the webhook ID.webhook
- the webhook.- Returns:
- the updated webhook.
- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-
deleteWebhook
@DELETE @Path("/{webhookId}") void deleteWebhook(@PathParam("webhookId") Integer webhookId) throws IOException, ViagogoException - Parameters:
webhookId
- the webhook ID.- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-
ping
@POST @Path("/{webhookId}/ping") @Produces("application/json") @Consumes("application/json") void ping(@PathParam("webhookId") Integer webhookId) throws IOException, ViagogoException Ping a webhookTriggers a request to be sent to your webhook. Call this endpoint to test your webhook.
- Parameters:
webhookId
- the webhook ID.- Throws:
IOException
- indicates I/O exceptionViagogoException
- indicates business exception
-