# Bitlinks

open class Bitlinks(accessToken: String)(source)

Provides functions to create and manage Bitlinks.

See the Bitly API for more information.

## Constructors

Bitlinks
Link copied to clipboard
constructor(accessToken: String)

## Properties

lastCallResponse
Link copied to clipboard
var lastCallResponse: CallResponse

The last API call response.

## Functions

clicks
Link copied to clipboard
fun clicks(bitlink: String, unit: Units = Units.DAY, units: Int = -1, unit_reference: String = Constants.EMPTY, toJson: Boolean = false): String

Returns the click counts for a specified Bitlink.

create
Link copied to clipboard
fun create(config: CreateConfig): String
fun create(long_url: String, domain: String = Constants.EMPTY, group_guid: String = Constants.EMPTY, title: String = Constants.EMPTY, tags: Array<String> = emptyArray(), deeplinks: CreateDeeplinks = CreateDeeplinks(), toJson: Boolean = false): String

Converts a long url to a Bitlink and sets additional parameters.

expand
Link copied to clipboard
fun expand(bitlink_id: String, toJson: Boolean = false): String

Expands a Bitlink.

shorten
Link copied to clipboard
fun shorten(long_url: String, domain: String = Constants.EMPTY, group_guid: String = Constants.EMPTY, toJson: Boolean = false): String

Shortens a long URL.

update
Link copied to clipboard
fun update(config: UpdateConfig): String
fun update(bitlink: String, title: String = Constants.EMPTY, archived: Boolean = false, tags: Array<String> = emptyArray(), deeplinks: UpdateDeeplinks = UpdateDeeplinks(), toJson: Boolean = false): String

Updates parameters in the specified Bitlink.

updateCustom
Link copied to clipboard
fun updateCustom(custom_bitlink: String, bitlink_id: String, toJson: Boolean = false): String

Move a keyword (or custom back-half) to a different Bitlink (domains must match).