public class BitlinkService 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 |
|---|
BitlinkService(String accessToken,
HttpContext httpContext)
Constructor that takes a http context and API client.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<CreateBitlinkResponse> |
create(CreateFullBitlinkRequest request)
Creates a bitlink.
|
com.google.common.base.Optional<ExpandBitlinkResponse> |
expand(ExpandBitlinkRequest request)
Returns the long url for the given bitlink.
|
com.google.common.base.Optional<ExpandBitlinkResponse> |
expand(String bitlink)
Returns the long url for the given bitlink.
|
com.google.common.base.Optional<GetBitlinkResponse> |
get(String bitlink)
Returns the attributes of the given bitlink.
|
com.google.common.base.Optional<GetBitlinkClicksResponse> |
getClicks(String bitlink,
UnitQuery query)
Returns the clicks for the given bitlink.
|
com.google.common.base.Optional<GetBitlinkClicksSummaryResponse> |
getClicksSummary(String bitlink,
UnitQuery query)
Returns the clicks summary for the given bitlink.
|
com.google.common.base.Optional<GetMetricsByCountriesResponse> |
getMetricsByCountries(String bitlink,
UnitQuery query)
Returns the metrics for the given bitlink by countries.
|
com.google.common.base.Optional<GetMetricsByReferrersResponse> |
getMetricsByReferrers(String bitlink,
UnitQuery query)
Returns the metrics for the given bitlink by referrers.
|
com.google.common.base.Optional<GetMetricsByReferrersByDomainResponse> |
getMetricsByReferrersByDomain(String bitlink,
UnitQuery query)
Returns the metrics for the given bitlink by referrers by domain.
|
com.google.common.base.Optional<GetMetricsByReferringDomainsResponse> |
getMetricsByReferringDomains(String bitlink,
UnitQuery query)
Returns the metrics for the given bitlink by referring domains.
|
com.google.common.base.Optional<GetBitlinkQrCodeResponse> |
getQrCode(String bitlink)
Returns the QR code for the given bitlin.
|
com.google.common.base.Optional<CreateBitlinkResponse> |
shorten(CreateBitlinkRequest request)
Shortens the given long url.
|
com.google.common.base.Optional<CreateBitlinkResponse> |
shorten(String longUrl)
Shortens the given long url.
|
com.google.common.base.Optional<UpdateBitlinkResponse> |
update(String bitlink,
UpdateBitlinkRequest request)
Updates the given bitlink.
|
getQueryParameterList, getQueryParameterListencode, getHeaderspublic BitlinkService(String accessToken, HttpContext httpContext)
accessToken - The access token used to authenticate the operationshttpContext - The set of HTTP operationspublic com.google.common.base.Optional<GetBitlinkResponse> get(String bitlink) throws IOException, URISyntaxException
bitlink - The bitlink 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<CreateBitlinkResponse> create(CreateFullBitlinkRequest request) throws IOException
request - The request containing the attributes of the bitlink to be createdIOException - if there is a communication error.public com.google.common.base.Optional<CreateBitlinkResponse> shorten(String longUrl) throws IOException
longUrl - The long url to be shortenedIOException - if there is a communication error.public com.google.common.base.Optional<CreateBitlinkResponse> shorten(CreateBitlinkRequest request) throws IOException
request - The request containing the long url to be shortenedIOException - if there is a communication error.public com.google.common.base.Optional<ExpandBitlinkResponse> expand(String bitlink) throws IOException
bitlink - The bitlink to be expandedIOException - if there is a communication error.public com.google.common.base.Optional<ExpandBitlinkResponse> expand(ExpandBitlinkRequest request) throws IOException
request - The request containing the bitlink to be expandedIOException - if there is a communication error.public com.google.common.base.Optional<UpdateBitlinkResponse> update(String bitlink, UpdateBitlinkRequest request) throws IOException, URISyntaxException
bitlink - The bitlink to be updatedrequest - The request containing the attributes of the bitlink 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<GetBitlinkClicksResponse> getClicks(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetBitlinkClicksSummaryResponse> getClicksSummary(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetMetricsByCountriesResponse> getMetricsByCountries(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetMetricsByReferrersResponse> getMetricsByReferrers(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetMetricsByReferringDomainsResponse> getMetricsByReferringDomains(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetMetricsByReferrersByDomainResponse> getMetricsByReferrersByDomain(String bitlink, UnitQuery query) throws IOException, URISyntaxException
bitlink - The bitlink for the metricsquery - The attributes of the units to use for the queryIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetBitlinkQrCodeResponse> getQrCode(String bitlink) throws IOException, URISyntaxException
bitlink - The bitlink for the QR codeIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.Copyright © 2020. All rights reserved.