bitly_update_bitlink: Update a Bitlink

View source: R/bitly_links.R

bitly_update_bitlinkR Documentation

Update a Bitlink

Description

See https://dev.bitly.com/api-reference/#updateBitlink Update fields in the Bitlink

Usage

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)
)

Arguments

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. c("test1", "test2")

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

Examples

## 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)

dmpe/urlshorteneR documentation built on Aug. 23, 2022, 1:12 a.m.