Interface WebhookResource
@Path("/{version}/webhooks")
public interface WebhookResource
-
Method Summary
Modifier and TypeMethodDescriptioncreateWebhook
(Webhook webhook) void
deleteWebhook
(Integer webhookId) getWebhook
(Integer webhookId) getWebhooks
(Integer page, Integer pageSize, String sort) void
updateWebhook
(Integer webhookId, Webhook webhook)
-
Method Details
-
getWebhooks
@GET @Produces("application/json") @Consumes("application/json") 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") Webhook createWebhook(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}") 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") Webhook updateWebhook(@PathParam("webhookId") Integer webhookId, 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
-