public class WebhookService extends BitlyV4Service
CREATE_BITLINK, CREATE_CAMPAIGN, CREATE_CHANNEL, CREATE_CUSTOM_BITLINK, CREATE_WEBHOOK, EXPAND_BITLINK, GET_BITLINK, GET_BITLINK_CLICKS, GET_BITLINK_CLICKS_SUMMARY, GET_BITLINK_QR_CODE, GET_BITLINKS_BY_GROUP, GET_CAMPAIGN, GET_CHANNEL, GET_CUSTOM_BITLINK, GET_GROUP, GET_GROUP_PREFERENCES, GET_GROUP_TAGS, GET_METRICS_BY_COUNTRIES, GET_METRICS_BY_DESTINATION, GET_METRICS_BY_REFERRERS, GET_METRICS_BY_REFERRERS_BY_DOMAIN, GET_METRICS_BY_REFERRING_DOMAINS, GET_METRICS_BY_REFERRING_NETWORKS, GET_OAUTH_APP, GET_ORGANIZATION, GET_SHORTEN_COUNTS, GET_SORTED_BITLINKS_BY_GROUP, GET_USER, GET_WEBHOOK, LIST_BSDS, LIST_CAMPAIGNS, LIST_CHANNELS, LIST_GROUPS, LIST_ORGANIZATIONS, LIST_WEBHOOKS, UPDATE_BITLINK, UPDATE_CAMPAIGN, UPDATE_CHANNEL, UPDATE_CUSTOM_BITLINK, UPDATE_GROUP, UPDATE_GROUP_PREFERENCES, UPDATE_USER, UPDATE_WEBHOOKHTTP| Constructor and Description |
|---|
WebhookService(String accessToken,
HttpContext httpContext)
Constructor that takes a http context and API client.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<CreateWebhookResponse> |
create(CreateWebhookRequest request)
Creates a webhook.
|
void |
delete(String webhookGuid)
Deletes the given webhook.
|
com.google.common.base.Optional<GetWebhookResponse> |
get(String webhookGuid)
Returns the attributes of the given webhook.
|
com.google.common.base.Optional<ListWebhooksResponse> |
list(String organizationGuid)
Returns the webooks for the given organization GUID.
|
com.google.common.base.Optional<UpdateWebhookResponse> |
update(String webhookGuid,
UpdateWebhookRequest request)
Updates the attributes of the given webhook.
|
getQueryParameterList, getQueryParameterListencode, getHeaderspublic WebhookService(String accessToken, HttpContext httpContext)
accessToken - The access token used to authenticate the operationshttpContext - The set of HTTP operationspublic com.google.common.base.Optional<GetWebhookResponse> get(String webhookGuid) throws IOException, URISyntaxException
webhookGuid - The GUID of the webhook to be retrievedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<CreateWebhookResponse> create(CreateWebhookRequest request) throws IOException
request - The request containing the attributes of the webhook to be createdIOException - if there is a communication error.public com.google.common.base.Optional<UpdateWebhookResponse> update(String webhookGuid, UpdateWebhookRequest request) throws IOException, URISyntaxException
webhookGuid - The GUID of the webhook to be updatedrequest - The request containing the attributes of the webhook to be updatedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<ListWebhooksResponse> list(String organizationGuid) throws IOException, URISyntaxException
organizationGuid - The GUID of the organization for the webhooks to be retrievedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public void delete(String webhookGuid) throws IOException, URISyntaxException
webhookGuid - The GUID of the webhook to be deletedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.Copyright © 2020. All rights reserved.