public class GroupService 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 |
|---|
GroupService(String accessToken,
HttpContext httpContext)
Constructor that takes a http context and API client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String groupGuid)
Deletes the given group.
|
com.google.common.base.Optional<GetGroupResponse> |
get(String groupGuid)
Returns the attributes of the given group.
|
com.google.common.base.Optional<GetBitlinksByGroupResponse> |
getBitlinks(String groupGuid,
BitlinkQuery query)
Returns the bitlinks for the given group.
|
com.google.common.base.Optional<GetMetricsByCountriesResponse> |
getMetricsByCountries(String groupGuid,
UnitQuery query)
Returns the metrics for the given group by countries.
|
com.google.common.base.Optional<GetMetricsByReferringNetworksResponse> |
getMetricsByReferringNetworks(String groupGuid)
Returns the metrics for the given group by referring networks.
|
com.google.common.base.Optional<GetGroupPreferencesResponse> |
getPreferences(String groupGuid)
Returns the preferences for the given group.
|
com.google.common.base.Optional<GetShortenCountsResponse> |
getShortenCounts(String groupGuid,
UnitQuery query)
Returns the shorten counts for the given group.
|
com.google.common.base.Optional<GetSortedBitlinksByGroupResponse> |
getSortedBitlinks(String groupGuid,
Sort sort,
UnitQuery query)
Returns the sorted bitlinks for the given group.
|
com.google.common.base.Optional<GetGroupTagsResponse> |
getTags(String groupGuid)
Returns the tags for the given group.
|
com.google.common.base.Optional<ListGroupsResponse> |
list(String organizationGuid)
Returns the groups for the given organization GUID.
|
com.google.common.base.Optional<UpdateGroupResponse> |
update(String groupGuid,
UpdateGroupRequest request)
Updates the attributes of the given group.
|
com.google.common.base.Optional<UpdateGroupPreferencesResponse> |
updatePreferences(String groupGuid,
UpdateGroupPreferencesRequest request)
Updates the preferences of the given group.
|
getQueryParameterList, getQueryParameterListencode, getHeaderspublic GroupService(String accessToken, HttpContext httpContext)
accessToken - The access token used to authenticate the operationshttpContext - The set of HTTP operationspublic com.google.common.base.Optional<GetGroupResponse> get(String groupGuid) throws IOException, URISyntaxException
groupGuid - The GUID of the group 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<UpdateGroupResponse> update(String groupGuid, UpdateGroupRequest request) throws IOException, URISyntaxException
groupGuid - The GUID of the group to be updatedrequest - The request containing the attributes of the group 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<ListGroupsResponse> list(String organizationGuid) throws IOException, URISyntaxException
organizationGuid - The GUID of the organization for the groups to be retrievedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public void delete(String groupGuid) throws IOException, URISyntaxException
groupGuid - The GUID of the group to be deletedIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetGroupTagsResponse> getTags(String groupGuid) throws IOException, URISyntaxException
groupGuid - The GUID of the group with the tagsIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<GetShortenCountsResponse> getShortenCounts(String groupGuid, UnitQuery query) throws IOException, URISyntaxException
groupGuid - The guid for the groupquery - 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<GetGroupPreferencesResponse> getPreferences(String groupGuid) throws IOException, URISyntaxException
groupGuid - The GUID of the group with the preferencesIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.public com.google.common.base.Optional<UpdateGroupPreferencesResponse> updatePreferences(String groupGuid, UpdateGroupPreferencesRequest request) throws IOException, URISyntaxException
groupGuid - The GUID of the group to be updatedrequest - The request containing the preferences of the group 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<GetBitlinksByGroupResponse> getBitlinks(String groupGuid, BitlinkQuery query) throws IOException, URISyntaxException
groupGuid - The guid for the groupquery - The attributes of the bitlinks 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<GetSortedBitlinksByGroupResponse> getSortedBitlinks(String groupGuid, Sort sort, UnitQuery query) throws IOException, URISyntaxException
groupGuid - The guid for the groupsort - The sort for the groupquery - 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 groupGuid, UnitQuery query) throws IOException, URISyntaxException
groupGuid - The GUID of the group 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<GetMetricsByReferringNetworksResponse> getMetricsByReferringNetworks(String groupGuid) throws IOException, URISyntaxException
groupGuid - The GUID of the group for the metricsIOException - if there is a communication error.URISyntaxException - if there is a format error in the URL.Copyright © 2020. All rights reserved.