Bitlinks

open class Bitlinks(accessToken: String)

Provides functions to create and manage Bitlinks.

See the Bitly API for more information.

Constructors

Bitlinks
Link copied to clipboard
fun Bitlinks(accessToken: String)

Functions

clicks
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.
create
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.
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, group_guid: String = Constants.EMPTY, domain: String = Constants.EMPTY, toJson: Boolean = false): String
Shortens a long URL.
update
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 fields in the specified Bitlink.

Properties

lastCallResponse
Link copied to clipboard
var lastCallResponse: CallResponse
The last API call response.