Bitlinks

open class Bitlinks(accessToken: String)(source)

Provides functions to create and manage Bitlinks.

See the Bitly API for more information.

Constructors

Link copied to clipboard
constructor(accessToken: String)

Properties

Link copied to clipboard

The last API call response.

Functions

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

Returns the click counts for a specified Bitlink.

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

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

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

Expands a Bitlink.

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

Shortens a long URL.

Link copied to clipboard
fun update(bitlink: String, references: Map<String, String> = emptyMap(), archived: Boolean = false, tags: Array<String> = emptyArray(), created_at: String = Constants.EMPTY, title: String = Constants.EMPTY, deeplinks: Array<Map<String, String>> = emptyArray(), created_by: String = Constants.EMPTY, long_url: String = Constants.EMPTY, client_id: String = Constants.EMPTY, custom_bitlinks: Array<String> = emptyArray(), link: String = Constants.EMPTY, id: String = Constants.EMPTY, toJson: Boolean = false): String

Updates parameters in the specified Bitlink.