Title: | R Wrapper for the 'Bit.ly' and 'Is.gd'/'v.gd' URL Shortening Services |
---|---|
Description: | Allows using two URL shortening services, which also provide expanding and analytic functions. Specifically developed for 'Bit.ly' (which requires OAuth 2.0) and 'is.gd' (no API key). |
Authors: | John Malc [aut, cre] (@dmpe), Andrea Dodet [ctb] (@andodet), Stephen Synchronicity [ctb] (@yogat3ch) |
Maintainer: | John Malc <[email protected]> |
License: | Apache License 2.0 |
Version: | 1.5.7 |
Built: | 2024-11-10 05:15:40 UTC |
Source: | https://github.com/dmpe/urlshortener |
Add a Keyword to a Bitlink
bitly_add_cust_bitlink( bitlink_id = NULL, custom_bitlink = NULL, showRequestURL = FALSE )
bitly_add_cust_bitlink( bitlink_id = NULL, custom_bitlink = NULL, showRequestURL = FALSE )
bitlink_id |
- string |
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Custom Bitlinks have both a branded short domain (BSD) AND a customized backend. For example, bit.ly/bitlinks would not be considered a Custom Bitlink because it does not have a branded short domain. es.pn/2yxklu would not be considered a custom Bitlink because while it has a branded short domain, it doesn't have a customized backhalf. An example of a link that would live in this section is es.pn/SuperBowl
https://dev.bitly.com/api-reference/#addCustomBitlink
## Not run: bitly_add_cust_bitlink(custom_bitlink = "es.pn/SuperBowl", bitlink_id = "") ## End(Not run)
## Not run: bitly_add_cust_bitlink(custom_bitlink = "es.pn/SuperBowl", bitlink_id = "") ## End(Not run)
Retrieve details for the provided OAuth App client ID
bitly_app_details( client_id = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", showRequestURL = F )
bitly_app_details( client_id = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", showRequestURL = F )
client_id |
- The client ID of an OAuth app |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
There are 2 ways of how you can authenticate using this package.
1. The recommended practise for the end-user of this package is to use default API keys which are provided using this method.
2. Alternatively, you can register your own application via the web in order to get Client ID and Client Secret code.
For that go first to https://app.bitly.com/settings/integrations/. Click REGISTERED OAUTH APPLICATIONS
,
then REGISTER NEW APPLICATION
followed by GET REGISTRATION CODE
.
Open your email that you will receive and click COMPLETE REGISTRATION
.
Make up an APPLICATION NAME
that is unique. Unless you know to do otherwise,
type "http://localhost:1410/" (slash at the end is important) in REDIRECT URIs
. For
APPLICATION LINK
and APPLICATION DESCRIPTION
you can type whatever you like.
bitly_auth( key = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", secret = "f9c6a3b18968e991e35f466e90c7d883cc176073", debug = F, token )
bitly_auth( key = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", secret = "f9c6a3b18968e991e35f466e90c7d883cc176073", debug = F, token )
key |
- Client ID |
secret |
- Client Secret |
debug |
- whether to print additional debug messages |
token |
- a |
Before choosing registering new application yourself, you can try using my API keys (the default option). No worries, no information is exposed to me at all: neither what you shorten nor who does it, etc. In fact, quote: "If you are shortening URLs on behalf of end-users, we ask that you use our OAuth 2 implementation to authenticate end-users before shortening. URLs shortened in this manner will be added to the specified end-user's history, allowing the end-user to manage and track the shortened URLs".
If using RStudio in the browsers via RStudio Server, then authentication may not work well. In such case, use desktop RStudio application. Look for help at <https://support.rstudio.com/>.
See https://dev.bitly.com/api-reference
## Not run: # overwrite keys - Variant 2 bitly_token <- bitly_auth( key = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", secret = "f9c6a3b18968e991e35f466e90c7d883cc176073" ) # default variant bitly_token <- bitly_auth() saveRDS(bitly_token, "bitly_token.rds") # for non-interactive use: bitly_auth(token = "bitly_token.rds") ## End(Not run)
## Not run: # overwrite keys - Variant 2 bitly_token <- bitly_auth( key = "be03aead58f23bc1aee6e1d7b7a1d99d62f0ede8", secret = "f9c6a3b18968e991e35f466e90c7d883cc176073" ) # default variant bitly_token <- bitly_auth() saveRDS(bitly_token, "bitly_token.rds") # for non-interactive use: bitly_auth(token = "bitly_token.rds") ## End(Not run)
BSDs is an acronym for branded short domains. This is a custom 15 character or less domain for bitlinks. This allows you to customize the domain to your brand.
bitly_bsds(showRequestURL = F)
bitly_bsds(showRequestURL = F)
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getBSDs
Retrieves all account overrides matching specified group_guid and bsd query filters.
bitly_bsds_overrides(group_id = NA, showRequestURL = F)
bitly_bsds_overrides(group_id = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getOverridesForGroups
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) bsds_over <- bitly_bsds_overrides(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) bsds_over <- bitly_bsds_overrides(group_id = ui$default_group_guid[1]) ## End(Not run)
See https://dev.bitly.com/docs/getting-started/rate-limits and https://dev.bitly.com/api-reference/#createFullBitlink Convert a long url to a Bitlink and set additional parameters.
bitly_create_bitlink( long_url = NULL, domain = "bit.ly", title = NULL, tags = NULL, group_guid = NULL, deeplinks_list = list(app_uri_path = NULL, install_type = NULL, install_url = NULL, app_id = NULL), showRequestURL = FALSE )
bitly_create_bitlink( long_url = NULL, domain = "bit.ly", title = NULL, tags = NULL, group_guid = NULL, deeplinks_list = list(app_uri_path = NULL, install_type = NULL, install_url = NULL, app_id = NULL), showRequestURL = FALSE )
long_url |
- required, a long URL to be shortened (example: https://www.idnes.cz). Must contain http/https |
domain |
- (optional) the short domain to use; either bit.ly, j.mp, or bitly.com or a custom short domain. The default for this parameter is the short domain selected by each user in their bitly account settings. Passing a specific domain via this parameter will override the default settings. |
title |
- title of the bitlink |
tags |
- Array of string, use e.g. |
group_guid |
- a GUID for a Bitly group |
deeplinks_list |
- a list containing parameters below |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
app_uri_path |
- app_uri_path |
install_type |
- install_type |
install_url |
- install_url |
app_id |
- app_id |
id - a short bitly identifier for long_url which is unique to the given account.
long_url - This may not always be equal to the URL requested, as some URL normalization may occur (e.g., due to encoding differences, or case differences in the domain). This long_url will always be functionally identical the the request parameter.
link - an bitly id with http(s) prefix
Look in the vignette for bulk shortening of URLs. Each call of this function == 1 API call. Take that into consideration due to limits etc.
The bitly API does not support shortening more than one long URL with a single API call. Meaning 1 Long URL = 1 Function call.
Long URLs should be URL-encoded. You can not include a longUrl in the request that has &, ?, #, or other reserved parameters without first encoding it.
The default value for the domain parameter is selected by each user from within their bitly account settings at <https://app.bitly.com/settings/api/>.
Long URLs should not contain spaces: any longUrl with spaces will be rejected. All spaces should be either percent encoded spaces are all indications of errors. Please remember to strip leading and trailing whitespace from any user input before shortening.
## Not run: bitly_create_bitlink(long_url = "http://slovnik.seznam.cz/") ## End(Not run)
## Not run: bitly_create_bitlink(long_url = "http://slovnik.seznam.cz/") ## End(Not run)
Create a new campaign
bitly_create_campaigns( group_guid = NULL, channel_guids = NULL, description = NULL, name = NULL, showRequestURL = T )
bitly_create_campaigns( group_guid = NULL, channel_guids = NULL, description = NULL, name = NULL, showRequestURL = T )
group_guid |
- a GUID for a Bitly group |
channel_guids |
- a list of strings |
description |
- description of campaign |
name |
- its name |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#createCampaign
## Not run: cc <- bitly_create_campaigns( group_guid = "testing", showRequestURL = TRUE, channel_guids = list("1", "2", "3"), description = "description", name = "name" ) ## End(Not run)
## Not run: cc <- bitly_create_campaigns( group_guid = "testing", showRequestURL = TRUE, channel_guids = list("1", "2", "3"), description = "description", name = "name" ) ## End(Not run)
Create a new channel
bitly_create_channel( group_guid = NULL, guid = NULL, name = NULL, modified = NULL, created = NULL, campaign_guid = NULL, bitlink_id = NULL, showRequestURL = T )
bitly_create_channel( group_guid = NULL, guid = NULL, name = NULL, modified = NULL, created = NULL, campaign_guid = NULL, bitlink_id = NULL, showRequestURL = T )
group_guid |
- a GUID for a Bitly group |
guid |
- ID for a channel |
name |
- its name |
modified |
- string | ISO_TIMESTAMP |
created |
- string | ISO TIMESTAMP |
campaign_guid |
- string | A GUID for a Bitly campaign |
bitlink_id |
- string |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#createChannel
## Not run: gc <- bitly_create_channel(group_guid = "testing", ...) ## End(Not run)
## Not run: gc <- bitly_create_channel(group_guid = "testing", ...) ## End(Not run)
See https://dev.bitly.com/api-reference/#expandBitlink This endpoint returns public information for a Bitlink.
bitly_expand_link(bitlink_id = NULL, showRequestURL = FALSE)
bitly_expand_link(bitlink_id = NULL, showRequestURL = FALSE)
bitlink_id |
- string |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
long_url - a full URL to which bitlink points to
## Not run: bitly_expand_link(bitlink_id = "bit.ly/DPetrov") bitly_expand_link(bitlink_id = "on.natgeo.com/1bEVhwE") ## manyHashes <- list("bit.ly/DPetrov", "bit.ly/1QU8CFm", "bit.ly/1R1LPSE", "bit.ly/1LNqqva") ## for (u in 1:length(manyHashes)) { ## print(bitly_expand_link(bitlink_id = manyHashes[[u]], showRequestURL = TRUE)) ## } ## End(Not run)
## Not run: bitly_expand_link(bitlink_id = "bit.ly/DPetrov") bitly_expand_link(bitlink_id = "on.natgeo.com/1bEVhwE") ## manyHashes <- list("bit.ly/DPetrov", "bit.ly/1QU8CFm", "bit.ly/1R1LPSE", "bit.ly/1LNqqva") ## for (u in 1:length(manyHashes)) { ## print(bitly_expand_link(bitlink_id = manyHashes[[u]], showRequestURL = TRUE)) ## } ## End(Not run)
Provides bit.ly rate limits by endpoint. See https://dev.bitly.com/api-reference/#getPlatformLimitss
bitly_rate_limits(showRequestURL = F)
bitly_rate_limits(showRequestURL = F)
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
data.frame
of end points and their rate limits by action
This endpoint returns information for a Bitlink.
bitly_retrieve_bitlink(bitlink = NULL, showRequestURL = FALSE)
bitly_retrieve_bitlink(bitlink = NULL, showRequestURL = FALSE)
bitlink |
- required, a Bitlink made of the domain and hash |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
See https://dev.bitly.com/api-reference/#getBitlink
## Not run: bitly_retrieve_bitlink(bitlink = "cnn.it/2HomWGB") ## End(Not run)
## Not run: bitly_retrieve_bitlink(bitlink = "cnn.it/2HomWGB") ## End(Not run)
See https://dev.bitly.com/api-reference/#getBitlinksByGroup Retrieve a paginated collection of Bitlinks for a Group
bitly_retrieve_bitlinks_by_groups( group_guid = NULL, size = 50, page = 1, showRequestURL = FALSE, keyword = NULL, query_q = NULL, created_before = NULL, created_after = NULL, modified_after = NULL, archived = "both", deeplinks = "both", campaign_guid = NULL, channel_guid = NULL, custom_bitlink = "both", tags = NULL, encoding_login = NULL, domain_deeplinks = "both" )
bitly_retrieve_bitlinks_by_groups( group_guid = NULL, size = 50, page = 1, showRequestURL = FALSE, keyword = NULL, query_q = NULL, created_before = NULL, created_after = NULL, modified_after = NULL, archived = "both", deeplinks = "both", campaign_guid = NULL, channel_guid = NULL, custom_bitlink = "both", tags = NULL, encoding_login = NULL, domain_deeplinks = "both" )
group_guid |
- a GUID for a Bitly group |
size |
- The quantity of items to be be returned |
page |
- Default: 1 | Integer specifying the numbered result at which to start |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
keyword |
- Custom keyword to filter on history entries |
query_q |
- a query to look for in bitlinks; acts a filter |
created_before |
- Timestamp as an integer unix epoch |
created_after |
- Timestamp as an integer unix epoch |
modified_after |
- Timestamp as an integer unix epoch,
see |
archived |
- string | Default: "off" | Enum:"on" "off" "both" | Whether or not to include archived bitlinks |
deeplinks |
- string | Default: "both" | Enum:"on" "off" "both" | Filter to only Bitlinks that contain deeplinks |
campaign_guid |
- string | A GUID for a Bitly campaign |
channel_guid |
- Filter to return only links for the given channel GUID, can be provided, overrides all other parameters |
custom_bitlink |
- string | Default: "both" | Enum:"on" "off" "both" |
tags |
- Array of string, use e.g. |
encoding_login |
- Array of string | Filter by the login of the authenticated user that created the Bitlink |
domain_deeplinks |
- string | Default: "both" | Enum:"on" "off" "both" | Filter to only Bitlinks that contain deeplinks configured with a custom domain |
## Not run: bitly_retrieve_bitlinks_by_groups(group_guid = "bit.ly/DPetrov", keyword = "novy titulek") ## End(Not run)
## Not run: bitly_retrieve_bitlinks_by_groups(group_guid = "bit.ly/DPetrov", keyword = "novy titulek") ## End(Not run)
Retrive details for a campaign
bitly_retrieve_campaign(campaign_guid = NULL, showRequestURL = T)
bitly_retrieve_campaign(campaign_guid = NULL, showRequestURL = T)
campaign_guid |
- string | A GUID for a Bitly campaign |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#getCampaign
## Not run: gc <- bitly_retrieve_campaign(campaign_guid = "testing") ## End(Not run)
## Not run: gc <- bitly_retrieve_campaign(campaign_guid = "testing") ## End(Not run)
Retrieve the campaigns for the current user
bitly_retrieve_campaigns(group_guid = NULL, showRequestURL = T)
bitly_retrieve_campaigns(group_guid = NULL, showRequestURL = T)
group_guid |
- a GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#getCampaigns
## Not run: gc <- bitly_retrieve_campaigns(group_guid = "testing") ## End(Not run)
## Not run: gc <- bitly_retrieve_campaigns(group_guid = "testing") ## End(Not run)
Get a channel's details
bitly_retrieve_channel(channel_guid = NULL, showRequestURL = T)
bitly_retrieve_channel(channel_guid = NULL, showRequestURL = T)
channel_guid |
- GUID of a target channel |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#getChannel
## Not run: gc <- bitly_retrieve_channel(channel_guid = "testing") ## End(Not run)
## Not run: gc <- bitly_retrieve_channel(channel_guid = "testing") ## End(Not run)
Retrieve the channels available to a user
bitly_retrieve_channels( group_guid = NULL, campaign_guid = NULL, showRequestURL = T )
bitly_retrieve_channels( group_guid = NULL, campaign_guid = NULL, showRequestURL = T )
group_guid |
- a GUID for a Bitly group |
campaign_guid |
- string | A GUID for a Bitly campaign |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#getChannels
## Not run: gc <- bitly_retrieve_channels(group_guid = "testing", campaign_guid = "test") ## End(Not run)
## Not run: gc <- bitly_retrieve_channels(group_guid = "testing", campaign_guid = "test") ## End(Not run)
See https://dev.bitly.com/api-reference/#getClicksForBitlink This will return the click counts for a specified Bitlink. This returns an array with clicks based on a date.
bitly_retrieve_clicks( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitly_retrieve_clicks( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
size |
- The quantity of items to be be returned |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
unit |
- A unit of time |
units |
- An integer representing the time units to query data for. pass -1 to return all units of time. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: bitly_retrieve_clicks(bitlink = "cnn.it/2HomWGB", unit = "day", units = -1, size = 100) ## End(Not run)
## Not run: bitly_retrieve_clicks(bitlink = "cnn.it/2HomWGB", unit = "day", units = -1, size = 100) ## End(Not run)
See https://dev.bitly.com/api-reference/#getClicksSummaryForBitlink This will return the click counts for a specified Bitlink. This rolls up all the data into a single field of clicks.
bitly_retrieve_clicks_summary( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitly_retrieve_clicks_summary( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
size |
- The quantity of items to be be returned |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
unit |
- A unit of time |
units |
- An integer representing the time units to query data for. pass -1 to return all units of time. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: bitly_retrieve_clicks_summary(bitlink = "cnn.it/2HomWGB", unit = "day", units = -1, size = 100) ## End(Not run)
## Not run: bitly_retrieve_clicks_summary(bitlink = "cnn.it/2HomWGB", unit = "day", units = -1, size = 100) ## End(Not run)
Retrieve the details and history of a Custom Bitlink
bitly_retrieve_cust_bitlink(custom_bitlink = NULL, showRequestURL = FALSE)
bitly_retrieve_cust_bitlink(custom_bitlink = NULL, showRequestURL = FALSE)
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getCustomBitlink
## Not run: bitly_retrieve_cust_bitlink(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
## Not run: bitly_retrieve_cust_bitlink(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
Returns the click counts for the specified link. This returns an array with clicks based on a date.
bitly_retrieve_cust_bitlink_clicks_history( custom_bitlink = NULL, showRequestURL = FALSE )
bitly_retrieve_cust_bitlink_clicks_history( custom_bitlink = NULL, showRequestURL = FALSE )
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getClicksForCustomBitlink
## Not run: bitly_retrieve_cust_bitlink_clicks_history(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
## Not run: bitly_retrieve_cust_bitlink_clicks_history(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
Returns click metrics for the specified link by its historical destinations.
bitly_retrieve_cust_bitlink_metrics_destination( custom_bitlink = NULL, showRequestURL = FALSE )
bitly_retrieve_cust_bitlink_metrics_destination( custom_bitlink = NULL, showRequestURL = FALSE )
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getCustomBitlinkMetricsByDestination
## Not run: bitly_retrieve_cust_bitlink_metrics_destination(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
## Not run: bitly_retrieve_cust_bitlink_metrics_destination(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
Get Click Metrics for a Custom Bitlink by historical Bitlink destinations
bitly_retrieve_destination_metrics( custom_bitlink = NULL, showRequestURL = FALSE )
bitly_retrieve_destination_metrics( custom_bitlink = NULL, showRequestURL = FALSE )
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getCustomBitlinkMetricsByDestination
## Not run: bitly_retrieve_destination_metrics(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
## Not run: bitly_retrieve_destination_metrics(custom_bitlink = "es.pn/SuperBowl") ## End(Not run)
Retrive details for a specific group that a user belongs to.
bitly_retrieve_group(group_id = NA, showRequestURL = F)
bitly_retrieve_group(group_id = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroup
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group(group_guid = ui$default_group_guid) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group(group_guid = ui$default_group_guid) ## End(Not run)
Returns the geographic origins of click traffic by city for the specified group. Requires a premium account.
bitly_retrieve_group_click_metrics_by_cities(group_id = NA, showRequestURL = F)
bitly_retrieve_group_click_metrics_by_cities(group_id = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference/#getGroupMetricsByCities
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_cities(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_cities(group_id = ui$default_group_guid[1]) ## End(Not run)
This endpoint will return metrics about the countries referring click traffic rolled up to a Group
bitly_retrieve_group_click_metrics_by_countries( group_id = NA, showRequestURL = F )
bitly_retrieve_group_click_metrics_by_countries( group_id = NA, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroupMetricsByCountries
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_countries(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_countries(group_id = ui$default_group_guid[1]) ## End(Not run)
Returns the device types generating click traffic to the specified group's links. Requires a premium account.
bitly_retrieve_group_click_metrics_by_devices( group_id = NA, showRequestURL = F )
bitly_retrieve_group_click_metrics_by_devices( group_id = NA, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference/#getGroupMetricsByDevices
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_devices(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_devices(group_id = ui$default_group_guid[1]) ## End(Not run)
This endpoint will return metrics about the referring network click traffic rolled up to a Group
bitly_retrieve_group_click_metrics_by_ref_networks( group_id = NA, showRequestURL = F )
bitly_retrieve_group_click_metrics_by_ref_networks( group_id = NA, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#GetGroupMetricsByReferringNetworks
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_ref_networks(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_click_metrics_by_ref_networks(group_id = ui$default_group_guid[1]) ## End(Not run)
Retrieve preferences for a specific group
bitly_retrieve_group_pref(group_id = NA, showRequestURL = F)
bitly_retrieve_group_pref(group_id = NA, showRequestURL = F)
group_id |
- the group id the user belongs to |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroupPreferences
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) group_pref <- bitly_retrieve_group_pref(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) group_pref <- bitly_retrieve_group_pref(group_id = ui$default_group_guid[1]) ## End(Not run)
Get all the shorten counts for a specific group
bitly_retrieve_group_shorten_counts(group_id = NA, showRequestURL = F)
bitly_retrieve_group_shorten_counts(group_id = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroupShortenCounts
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_shorten_counts(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_group_shorten_counts(group_id = ui$default_group_guid[1]) ## End(Not run)
Retrive details for all groups that a user belongs to.
bitly_retrieve_groups(organization_id = NULL, showRequestURL = F)
bitly_retrieve_groups(organization_id = NULL, showRequestURL = F)
organization_id |
- an optional string parameter | A GUID for a Bitly organization |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroups
## Not run: rg <- bitly_retrieve_groups("") # will still work ok ## End(Not run)
## Not run: rg <- bitly_retrieve_groups("") # will still work ok ## End(Not run)
Retrieve a paginated collection of Bitlinks for a Group
bitly_retrieve_links_grouped( group_id = NA, keyword = NULL, search_query = NULL, created_before = NULL, created_after = NULL, modified_after = NULL, archived = "off", deeplinks = "both", domain_deeplinks = "both", campaign_guid = NULL, channel_guid = NULL, custom_bitlink = "both", tags = NULL, encoding_login = NULL, page = 1, size = 50, showRequestURL = F )
bitly_retrieve_links_grouped( group_id = NA, keyword = NULL, search_query = NULL, created_before = NULL, created_after = NULL, modified_after = NULL, archived = "off", deeplinks = "both", domain_deeplinks = "both", campaign_guid = NULL, channel_guid = NULL, custom_bitlink = "both", tags = NULL, encoding_login = NULL, page = 1, size = 50, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
keyword |
- Custom keyword to filter on history entries |
search_query |
- string | the value that you would like to search |
created_before |
- Timestamp as an integer unix epoch |
created_after |
- Timestamp as an integer unix epoch |
modified_after |
- Timestamp as an integer unix epoch,
see |
archived |
- string | Default: "off" | Enum:"on" "off" "both" | Whether or not to include archived bitlinks |
deeplinks |
- string | Default: "both" | Enum:"on" "off" "both" | Filter to only Bitlinks that contain deeplinks |
domain_deeplinks |
- string | Default: "both" | Enum:"on" "off" "both" | Filter to only Bitlinks that contain deeplinks configured with a custom domain |
campaign_guid |
- Filter to return only links for the given campaign GUID, can be provided |
channel_guid |
- Filter to return only links for the given channel GUID, can be provided, overrides all other parameters |
custom_bitlink |
- string | Default: "both" | Enum:"on" "off" "both" |
tags |
- Array of string | filter by given tags |
encoding_login |
- Array of string | Filter by the login of the authenticated user that created the Bitlink |
page |
- Default: 1 | Integer specifying the numbered result at which to start |
size |
- string | Default: 50 | The quantity of items to be be returned |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getBitlinksByGroup
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_links_grouped(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_links_grouped(group_id = ui$default_group_guid[1]) ## End(Not run)
This endpoint will return metrics about the countries referring click traffic to a single Bitlink.
bitly_retrieve_metrics_by_countries( bitlink = NULL, size = 100, unit = NULL, unit_reference = NULL, units = -1, showRequestURL = FALSE )
bitly_retrieve_metrics_by_countries( bitlink = NULL, size = 100, unit = NULL, unit_reference = NULL, units = -1, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
size |
- The quantity of items to be be returned |
unit |
- A unit of time |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
units |
- An integer representing the time units to query data for. pass -1 to return all units of time. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
https://dev.bitly.com/api-reference/#getMetricsForBitlinkByCountries
## Not run: bitly_retrieve_metrics_by_countries(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
## Not run: bitly_retrieve_metrics_by_countries(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
This endpoint will return metrics about the referrers referring click traffic to a single Bitlink.
bitly_retrieve_metrics_by_referrers( bitlink = NULL, size = 100, unit = NULL, unit_reference = NULL, units = -1, showRequestURL = FALSE )
bitly_retrieve_metrics_by_referrers( bitlink = NULL, size = 100, unit = NULL, unit_reference = NULL, units = -1, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
size |
- The quantity of items to be be returned |
unit |
- A unit of time |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
units |
- An integer representing the time units to query data for. pass -1 to return all units of time. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
https://dev.bitly.com/api-reference/#getMetricsForBitlinkByReferrers
## Not run: bitly_retrieve_metrics_by_referrers(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
## Not run: bitly_retrieve_metrics_by_referrers(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
This endpoint will group referrers metrics about a single Bitlink.
bitly_retrieve_metrics_by_referrers_by_domain( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitly_retrieve_metrics_by_referrers_by_domain( bitlink = NULL, size = 50, unit_reference = NULL, unit = NULL, units = -1, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
size |
- string | Default: 50 | The quantity of items to be be returned |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
unit |
- string | Default: "day", Enum: "minute" "hour" "day" "week" "month" | A unit of time |
units |
- integer | Default: -1 | An integer representing the time units to query data for. pass -1 to return all units of time. |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#getMetricsForBitlinkByReferrersByDomains
## Not run: bitly_retrieve_metrics_by_referrers_by_domain(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
## Not run: bitly_retrieve_metrics_by_referrers_by_domain(bitlink = "bit.ly/DPetrov", unit = "day", units = -1, size = 100) ## End(Not run)
Retrive details for the specified organization.
bitly_retrieve_org(organization_id = NULL)
bitly_retrieve_org(organization_id = NULL)
organization_id |
- a required string | A GUID for a Bitly organization. You may also simply pass "" (double quotes), but this should be avoided at all costs. |
Organizations are part of our hierarchy. This is the top level where a group and user will belong.
https://dev.bitly.com/api-reference/#getOrganization
## Not run: all_orgs <- bitly_retrieve_orgs() ro <- bitly_retrieve_org(organization_id = all_orgs$guid) ## End(Not run)
## Not run: all_orgs <- bitly_retrieve_orgs() ro <- bitly_retrieve_org(organization_id = all_orgs$guid) ## End(Not run)
Returns all plan limits and counts available for an organization.
bitly_retrieve_org_plan_limits(organization_id = NULL)
bitly_retrieve_org_plan_limits(organization_id = NULL)
organization_id |
- a required string | A GUID for a Bitly organization. You may also simply pass "" (double quotes), but this should be avoided at all costs. |
Organizations are part of our hierarchy. This is the top level where a group and user will belong.
https://dev.bitly.com/api-reference/#getPlanLimits
## Not run: all_orgs <- bitly_retrieve_orgs() plan <- bitly_retrieve_org_plan_limits(organization_id = all_orgs$guid) ## End(Not run)
## Not run: all_orgs <- bitly_retrieve_orgs() plan <- bitly_retrieve_org_plan_limits(organization_id = all_orgs$guid) ## End(Not run)
Retrieve all the shorten counts for a specific organization
bitly_retrieve_org_shorten_counts(organization_id = NULL)
bitly_retrieve_org_shorten_counts(organization_id = NULL)
organization_id |
- a required string | A GUID for a Bitly organization. You may also simply pass "" (double quotes), but this should be avoided at all costs. |
facet - Enum: "countries" "referrers" "referrers_by_domain" "referring_domains" "referring_networks" "shorten_counts"
Organizations are part of our hierarchy. This is the top level where a group and user will belong.
https://dev.bitly.com/api-reference/#getOrganizationShortenCounts
## Not run: all_orgs <- bitly_retrieve_orgs() osc <- bitly_org_shorten_counts(organization_id = all_orgs$guid) df_org_short_counts <- data.frame(osc, stringsAsFactors = FALSE) ## End(Not run)
## Not run: all_orgs <- bitly_retrieve_orgs() osc <- bitly_org_shorten_counts(organization_id = all_orgs$guid) df_org_short_counts <- data.frame(osc, stringsAsFactors = FALSE) ## End(Not run)
Retrieve a list of organizations
bitly_retrieve_orgs()
bitly_retrieve_orgs()
Organizations are part of our hierarchy. This is the top level where a group and user will belong.
https://dev.bitly.com/api-reference/#getOrganizations
## Not run: ros <- bitly_retrieve_orgs() ## End(Not run)
## Not run: ros <- bitly_retrieve_orgs() ## End(Not run)
See https://dev.bitly.com/api-reference/#getSortedBitlinks This will retrieve a paginated response for Bitlinks that are sorted for the Group
bitly_retrieve_sorted_bitlinks_by_groups( group_guid = NULL, unit = "day", units = -1, sort = "clicks", size = 50, unit_reference = NULL, showRequestURL = FALSE )
bitly_retrieve_sorted_bitlinks_by_groups( group_guid = NULL, unit = "day", units = -1, sort = "clicks", size = 50, unit_reference = NULL, showRequestURL = FALSE )
group_guid |
- a GUID for a Bitly group |
unit |
- A unit of time |
units |
- An integer representing the time units to query data for. pass -1 to return all units of time. |
sort |
- required, Enum:"clicks" - The type of sorting that you would like to do |
size |
- The quantity of items to be be returned |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: bitly_retrieve_sorted_bitlinks_by_groups(group_guid = "", sort = "clicks") ## End(Not run)
## Not run: bitly_retrieve_sorted_bitlinks_by_groups(group_guid = "", sort = "clicks") ## End(Not run)
This will retrieve a paginated response for Bitlinks that are sorted for the Group. This method returns a combined object which end-user (you) have to further process for your needs.
bitly_retrieve_sorted_links( group_id = NA, to_sort_by = "clicks", unit = "day", units = -1, unit_reference = NULL, size = 50, showRequestURL = F )
bitly_retrieve_sorted_links( group_id = NA, to_sort_by = "clicks", unit = "day", units = -1, unit_reference = NULL, size = 50, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
to_sort_by |
- a required string | Enum: "clicks" | The type of sorting that you would like to do |
unit |
- string | Default: "day", Enum: "minute" "hour" "day" "week" "month" | A unit of time |
units |
- integer | Default: -1 | An integer representing the time units to query data for. pass -1 to return all units of time. |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
size |
- string | Default: 50 | The quantity of items to be be returned |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getSortedBitlinks
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_sorted_links(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_sorted_links(group_id = ui$default_group_guid[1]) ## End(Not run)
Retrieve the currently used tags for a group
bitly_retrieve_tags(group_id = NA, showRequestURL = F)
bitly_retrieve_tags(group_id = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#getGroupTags
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_tags(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) rg <- bitly_retrieve_tags(group_id = ui$default_group_guid[1]) ## End(Not run)
See https://dev.bitly.com/api-reference/#createBitlink Convert a long url to a Bitlink
bitly_shorten_link( domain = "bit.ly", group_guid = NULL, long_url = NULL, showRequestURL = FALSE )
bitly_shorten_link( domain = "bit.ly", group_guid = NULL, long_url = NULL, showRequestURL = FALSE )
domain |
- (optional) the short domain to use; either bit.ly, j.mp, or bitly.com or a custom short domain. The default for this parameter is the short domain selected by each user in their bitly account settings. Passing a specific domain via this parameter will override the default settings. |
group_guid |
- a GUID for a Bitly group |
long_url |
- required, a long URL to be shortened (example: https://www.idnes.cz). Must contain http/https |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: bitly_shorten_link(url = "http://www.seznam.cz/") bitly_shorten_link(url = "http://www.seznam.cz/", showRequestURL = TRUE) manyUrls <- list( "http://www.seznam.cz/", "http://www.seznamasdas.cz/", "http://www.seznam.cz/asadasd", "http://www.seznam.cz/adqwrewtregt" ) for (u in 1:length(manyUrls)) { print(bitly_shorten_link(long_url = manyUrls[[u]], showRequestURL = TRUE)) } ## End(Not run)
## Not run: bitly_shorten_link(url = "http://www.seznam.cz/") bitly_shorten_link(url = "http://www.seznam.cz/", showRequestURL = TRUE) manyUrls <- list( "http://www.seznam.cz/", "http://www.seznamasdas.cz/", "http://www.seznam.cz/asadasd", "http://www.seznam.cz/adqwrewtregt" ) for (u in 1:length(manyUrls)) { print(bitly_shorten_link(long_url = manyUrls[[u]], showRequestURL = TRUE)) } ## End(Not run)
See https://dev.bitly.com/api-reference/#updateBitlink Update fields in the Bitlink
bitly_update_bitlink( bitlink = NULL, archived = NULL, tags = NULL, showRequestURL = FALSE, created_at = NULL, title = NULL, created_by = NULL, long_url = NULL, client_id = NULL, custom_bitlinks = NULL, link = NULL, id = NULL, deeplinks = list(bitlink = NULL, install_url = NULL, created = NULL, modified = NULL, app_uri_path = NULL, install_type = NULL, app_guid = NULL, guid = NULL, os = NULL) )
bitly_update_bitlink( bitlink = NULL, archived = NULL, tags = NULL, showRequestURL = FALSE, created_at = NULL, title = NULL, created_by = NULL, long_url = NULL, client_id = NULL, custom_bitlinks = NULL, link = NULL, id = NULL, deeplinks = list(bitlink = NULL, install_url = NULL, created = NULL, modified = NULL, app_uri_path = NULL, install_type = NULL, app_guid = NULL, guid = NULL, os = NULL) )
bitlink |
- required, a Bitlink made of the domain and hash |
archived |
- string | Default: "off" | Enum:"on" "off" "both" | Whether or not to include archived bitlinks |
tags |
- Array of string, use e.g. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
created_at |
- update created at parameter |
title |
- title of the bitlink |
created_by |
- update user |
long_url |
- required, a long URL to be shortened (example: https://www.idnes.cz). Must contain http/https |
client_id |
- The client ID of an OAuth app |
custom_bitlinks |
- update custom_bitlinks |
link |
- link |
id |
- id |
deeplinks |
- string | Default: "both" | Enum:"on" "off" "both" | Filter to only Bitlinks that contain deeplinks |
## Not run: bitly_update_bitlink(bitlink = "bit.ly/DPetrov", title = "novy titulek") ## hash is the one which is only returned. Dont use bitly_update_bitlink(bitlink = "on.natgeo.com/1bEVhwE") ## manyHashes <- list("bit.ly/DPetrov", "bit.ly/1QU8CFm", "bit.ly/1R1LPSE", "bit.ly/1LNqqva") ## for (u in 1:length(manyHashes)) { ## print(bitly_update_bitlink(bitlink = manyHashes[[u]], ## title = stri_rand_strings(1, 8, pattern = "[A-Za-z0-9]"))) ## } ## End(Not run)
## Not run: bitly_update_bitlink(bitlink = "bit.ly/DPetrov", title = "novy titulek") ## hash is the one which is only returned. Dont use bitly_update_bitlink(bitlink = "on.natgeo.com/1bEVhwE") ## manyHashes <- list("bit.ly/DPetrov", "bit.ly/1QU8CFm", "bit.ly/1R1LPSE", "bit.ly/1LNqqva") ## for (u in 1:length(manyHashes)) { ## print(bitly_update_bitlink(bitlink = manyHashes[[u]], ## title = stri_rand_strings(1, 8, pattern = "[A-Za-z0-9]"))) ## } ## End(Not run)
Update an existing Channel
bitly_update_campaign( campaign_guid = NULL, group_guid = NULL, channel_guids = NULL, description = NULL, name = NULL, showRequestURL = T )
bitly_update_campaign( campaign_guid = NULL, group_guid = NULL, channel_guids = NULL, description = NULL, name = NULL, showRequestURL = T )
campaign_guid |
- string | A GUID for a Bitly campaign |
group_guid |
- a GUID for a Bitly group |
channel_guids |
- a list of strings |
description |
- description of campaign |
name |
- its name |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#updateCampaign
## Not run: cc <- bitly_update_campaign( group_guid = "", channel_guids = list("1", "2", "3"), description = "description", name = "name" ) ## End(Not run)
## Not run: cc <- bitly_update_campaign( group_guid = "", channel_guids = list("1", "2", "3"), description = "description", name = "name" ) ## End(Not run)
Update an existing Channel
bitly_update_channel( channel_guid = NULL, group_guid = NULL, guid = NULL, name = NULL, modified = NULL, created = NULL, campaign_guid = NULL, bitlink_id = NULL, showRequestURL = T )
bitly_update_channel( channel_guid = NULL, group_guid = NULL, guid = NULL, name = NULL, modified = NULL, created = NULL, campaign_guid = NULL, bitlink_id = NULL, showRequestURL = T )
channel_guid |
- GUID of a target channel |
group_guid |
- a GUID for a Bitly group |
guid |
- ID for a channel |
name |
- its name |
modified |
- string | ISO_TIMESTAMP |
created |
- string | ISO TIMESTAMP |
campaign_guid |
- string | A GUID for a Bitly campaign |
bitlink_id |
- string |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Bitly Campaigns allows you to build and manage omnichannel campaigns.
https://dev.bitly.com/api-reference/#updateChannel
## Not run: uc <- bitly_update_channel(channel_guid = "testing", group_guid = "", name = "name") ## End(Not run)
## Not run: uc <- bitly_update_channel(channel_guid = "testing", group_guid = "", name = "name") ## End(Not run)
Move a Keyword to a different Bitlink
bitly_update_cust_bitlink( custom_bitlink = NULL, bitlink_id = NULL, showRequestURL = FALSE )
bitly_update_cust_bitlink( custom_bitlink = NULL, bitlink_id = NULL, showRequestURL = FALSE )
custom_bitlink |
- A Custom Bitlink made of the domain and keyword |
bitlink_id |
- string |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
https://dev.bitly.com/api-reference/#updateCustomBitlink
## Not run: bitly_update_cust_bitlink(custom_bitlink = "es.pn/SuperBowl", bitlink_id = "") ## End(Not run)
## Not run: bitly_update_cust_bitlink(custom_bitlink = "es.pn/SuperBowl", bitlink_id = "") ## End(Not run)
Update the details of a group
bitly_update_group( group_id = NA, name = NA, organization_id = NA, showRequestURL = F )
bitly_update_group( group_id = NA, name = NA, organization_id = NA, showRequestURL = F )
group_id |
- a required string | A GUID for a Bitly group |
name |
- username to change |
organization_id |
- an optional string parameter | A GUID for a Bitly organization |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#updateGroup
[bitly_update_user()]
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) up_group <- bitly_update_group(group_id = ui$default_group_guid[1], name = "New Group Name", organization_id = "asd") ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) up_group <- bitly_update_group(group_id = ui$default_group_guid[1], name = "New Group Name", organization_id = "asd") ## End(Not run)
Update preferences for a specific group
bitly_update_group_pref(group_id = NA, domain_pref = NA, showRequestURL = F)
bitly_update_group_pref(group_id = NA, domain_pref = NA, showRequestURL = F)
group_id |
- a required string | A GUID for a Bitly group |
domain_pref |
- string |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
Groups are a subdivision within an organization. A user will belong to a group within an organization. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.
https://dev.bitly.com/api-reference#updateGroupPreferences
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) group_pref <- bitly_update_group_pref(group_id = ui$default_group_guid[1]) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) group_pref <- bitly_update_group_pref(group_id = ui$default_group_guid[1]) ## End(Not run)
This will overwrite your (display) username and/or group ID you belong to.
bitly_update_user(default_group_guid = NULL, name = "", showRequestURL = FALSE)
bitly_update_user(default_group_guid = NULL, name = "", showRequestURL = FALSE)
default_group_guid |
- group id to change, see NOTE |
name |
- username to change |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
User operations such as changing your name or fetching basic user information apply only to the authenticated user.
Applies only to the authenticated user: Changing group/org ID is only permitted to premium users. Thus, if you are a "free" user and will try to change your default group id to something else, you will get an error. In that case, only changing display name is permitted.
https://dev.bitly.com/api-reference/#updateUser
## Not run: # this applies only for "free" users uu <- bitly_update_user(name = "Malc") # if you are premium user, you can additionally adjust your group id uug <- bitly_update_user(name = "Malc", default_group_guid = "TestGroupID") ## End(Not run)
## Not run: # this applies only for "free" users uu <- bitly_update_user(name = "Malc") # if you are premium user, you can additionally adjust your group id uug <- bitly_update_user(name = "Malc", default_group_guid = "TestGroupID") ## End(Not run)
Retrieve information for the current authenticated user
bitly_user_info(showRequestURL = FALSE)
bitly_user_info(showRequestURL = FALSE)
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
login - the specified bitly login or the login of the authenticated user
name - the user's full/display name
default_group_guid - a group to which user belongs
created - Timestamp for the moment the user signed up (uses ymd_hms
)
is_active - whether a user profile is active
modified - Timestamp of the last modification to the user profile (uses ymd_hms
)
is_sso_user - is Single-Sign-On enabled for the user (PREMIUM FEATURE)
is_2fa_enabled - is 2 Step verification enabled ?
email - user's emails
User operations such as changing your name or fetching basic user information apply only to the authenticated user.
https://dev.bitly.com/api-reference/#getUser
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) ## End(Not run)
## Not run: ui <- bitly_user_info(showRequestURL = TRUE) ## End(Not run)
This endpoint will rollup the click counts to a referrer about a single Bitlink.
bitly_user_metrics_referring_domains( bitlink = NULL, unit = "day", units = -1, size = 50, unit_reference = NULL, showRequestURL = FALSE )
bitly_user_metrics_referring_domains( bitlink = NULL, unit = "day", units = -1, size = 50, unit_reference = NULL, showRequestURL = FALSE )
bitlink |
- required, a Bitlink made of the domain and hash |
unit |
- string | Default: "day", Enum: "minute" "hour" "day" "week" "month" | A unit of time |
units |
- integer | Default: -1 | An integer representing the time units to query data for. pass -1 to return all units of time. |
size |
- string | Default: 50 | The quantity of items to be be returned |
unit_reference |
- string | An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. |
showRequestURL |
- an optional T/F value to whether show URL which has been build and requested from server. For debug purposes, default FALSE. |
facet - string | One of "countries" "referrers" "referrers_by_domain" "referring_domains" "referring_networks" "shorten_counts"
See https://dev.bitly.com/api-reference/#getMetricsForBitlinkByReferringDomains
## Not run: bitly_user_metrics_referring_domains(bitlink = "cnn.it/2HomWGB", unit = "month", units = -1, size = 100) ## End(Not run)
## Not run: bitly_user_metrics_referring_domains(bitlink = "cnn.it/2HomWGB", unit = "month", units = -1, size = 100) ## End(Not run)
Expand an URL from clipboard
clipExpanderAddin()
clipExpanderAddin()
Shorten an URL from clipboard
clipShortenerAddin()
clipShortenerAddin()
See https://is.gd/apilookupreference.php
isgd_LinksExpand(shorturl = "", showRequestURL = FALSE)
isgd_LinksExpand(shorturl = "", showRequestURL = FALSE)
shorturl |
- (optional) You can specify the shorturl parameter if you'd like to pick a shortened URL instead of having is.gd randomly generate one. These must be between 5 and 30 characters long and can only contain alphanumeric characters and underscores. Shortened URLs are case sensitive. Bear in mind that a desired short URL might already be taken (this is very often the case with common words) so if you're using this option be prepared to respond to an error and get an alternative choice from your app's user. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: isgd_LinksExpand(shorturl = "https://is.gd/4oIAXJ", showRequestURL = TRUE) ## End(Not run)
## Not run: isgd_LinksExpand(shorturl = "https://is.gd/4oIAXJ", showRequestURL = TRUE) ## End(Not run)
See https://is.gd/apishorteningreference.php
isgd_LinksShorten( longUrl = "", logstats = "0", shorturl = NULL, showRequestURL = FALSE )
isgd_LinksShorten( longUrl = "", logstats = "0", shorturl = NULL, showRequestURL = FALSE )
longUrl |
- The url parameter is the address that you want to shorten. |
logstats |
- (optional) Adding the parameter logstats=1 turns on logging of detailed statistics when the shortened URL you create is accessed. This allows you to see how many times the link was accessed on a given day, what pages referred people to the link, what browser visitors were using etc. You can access these stats via the link preview page for your shortened URL (add a hyphen/dash to the end of the shortened URL to get to it). Creating links with statistics turned on has twice the "cost" towards our rate limit of other shortened links, so leave this parameter out of your API call if you don't require statistics on usage. See our usage limits page for more information on this https://is.gd/usagelimits.php. |
shorturl |
- (optional) You can specify the shorturl parameter if you'd like to pick a shortened URL instead of having is.gd randomly generate one. These must be between 5 and 30 characters long and can only contain alphanumeric characters and underscores. Shortened URLs are case sensitive. Bear in mind that a desired short URL might already be taken (this is very often the case with common words) so if you're using this option be prepared to respond to an error and get an alternative choice from your app's user. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: short_lin <- isgd_LinksShorten(longUrl = "https://novinky.cz/",showRequestURL = TRUE) ## End(Not run)
## Not run: short_lin <- isgd_LinksShorten(longUrl = "https://novinky.cz/",showRequestURL = TRUE) ## End(Not run)
Call this function as an addin to prompt a url shortener.
bit.ly accepts a custom domain, see bitly_shorten_link
.
shortenerAddin()
shortenerAddin()
See https://v.gd/apilookupreference.php
vgd_LinksExpand(shorturl = "", showRequestURL = FALSE)
vgd_LinksExpand(shorturl = "", showRequestURL = FALSE)
shorturl |
- (optional) You can specify the shorturl parameter if you'd like to pick a shortened URL instead of having v.gd randomly generate one. These must be between 5 and 30 characters long and can only contain alphanumeric characters and underscores. Shortened URLs are case sensitive. Bear in mind that a desired short URL might already be taken (this is very often the case with common words) so if you're using this option be prepared to respond to an error and get an alternative choice from your app's user. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: isgd_LinksExpand(shorturl = "https://v.gd/4oIAXJ", showRequestURL = TRUE) ## End(Not run)
## Not run: isgd_LinksExpand(shorturl = "https://v.gd/4oIAXJ", showRequestURL = TRUE) ## End(Not run)
See https://v.gd/apishorteningreference.php
vgd_LinksShorten( longUrl = "", logstats = "0", shorturl = NULL, showRequestURL = FALSE )
vgd_LinksShorten( longUrl = "", logstats = "0", shorturl = NULL, showRequestURL = FALSE )
longUrl |
- The url parameter is the address that you want to shorten. |
logstats |
- (optional) Adding the parameter logstats=1 turns on logging of detailed statistics when the shortened URL you create is accessed. This allows you to see how many times the link was accessed on a given day, what pages referred people to the link, what browser visitors were using etc. You can access these stats via the link preview page for your shortened URL (add a hyphen/dash to the end of the shortened URL to get to it). Creating links with statistics turned on has twice the "cost" towards our rate limit of other shortened links, so leave this parameter out of your API call if you don't require statistics on usage. See our usage limits page for more information on this https://v.gd/usagelimits.php. |
shorturl |
- (optional) You can specify the shorturl parameter if you'd like to pick a shortened URL instead of having v.gd randomly generate one. These must be between 5 and 30 characters long and can only contain alphanumeric characters and underscores. Shortened URLs are case sensitive. Bear in mind that a desired short URL might already be taken (this is very often the case with common words) so if you're using this option be prepared to respond to an error and get an alternative choice from your app's user. |
showRequestURL |
- show URL which has been build and requested from server. For debug purposes. |
## Not run: assd <- vgd_LinksShorten(longUrl = "https://novinky.cz/",showRequestURL = TRUE) ## End(Not run)
## Not run: assd <- vgd_LinksShorten(longUrl = "https://novinky.cz/",showRequestURL = TRUE) ## End(Not run)