Changed output for github pages.

This commit is contained in:
Erik C. Thauvin 2020-03-02 21:28:41 -08:00
parent ae47d44272
commit dcde83949b
38 changed files with 517 additions and 1 deletions

50
docs/alltypes/index.md Normal file
View file

@ -0,0 +1,50 @@
[Bitly Shortener for Kotlin/Java](https://github.com/ethauvin/bitly-shorten)
### All Types
| Name | Summary |
|---|---|
|
##### [net.thauvin.erik.bitly.Bitlinks](../net.thauvin.erik.bitly/-bitlinks/index.md)
Bitlinks methods implementation.
|
##### [net.thauvin.erik.bitly.Bitly](../net.thauvin.erik.bitly/-bitly/index.md)
A simple implementation of the [Bitly Shortner API v4](https://dev.bitly.com/v4/).
|
##### [net.thauvin.erik.bitly.Constants](../net.thauvin.erik.bitly/-constants/index.md)
Constants for this package.
|
##### [net.thauvin.erik.bitly.Methods](../net.thauvin.erik.bitly/-methods/index.md)
HTTP methods.
|
##### [net.thauvin.erik.bitly.Units](../net.thauvin.erik.bitly/-units/index.md)
Units of time.
|
##### [net.thauvin.erik.bitly.Utils](../net.thauvin.erik.bitly/-utils/index.md)
Useful functions.

15
docs/index.md Normal file
View file

@ -0,0 +1,15 @@
[docs](./index.md)
[Bitly Shortener for Kotlin/Java](https://github.com/ethauvin/bitly-shorten)
A simple implementation of the link shortening ([bitlinks](https://dev.bitly.com/v4/#tag/Bitlinks)) abilities of the [Bitly v4 API](https://dev.bitly.com/v4).
### Packages
| Name | Summary |
|---|---|
| [net.thauvin.erik.bitly](net.thauvin.erik.bitly/index.md) | |
### Index
[All Types](alltypes/index.md)

View file

@ -0,0 +1,10 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [<init>](./-init-.md)
# <init>
`Bitlinks(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Bitlinks methods implementation.
See the [Bitly API](https://dev.bitly.com/v4/#tag/Bitlinks) for more information.

View file

@ -0,0 +1,28 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [clicks](./clicks.md)
# clicks
`@JvmOverloads fun clicks(bitlink: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, unit: `[`Units`](../-units/index.md)` = Units.DAY, units: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = -1, size: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 50, unit_reference: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt#L63)
Returns the click counts for a specified Bitlink.
See the [Bitly API](https://dev.bitly.com/v4/#operation/getClicksSummaryForBitlink) for more information.
### Parameters
`bitlink` - The bitlink.
`unit` - A unit of time.
`units` - An integer representing the time units to query data for. pass -1 to return all units available.
`size` - The quantity of items to be be returned.
`unit_reference` - An ISO-8601 timestamp, indicating the most recent time for which to pull metrics.
Will default to current time.
`toJson` - Returns the full JSON response if `true`
**Return**
The click counts or JSON response object.

View file

@ -0,0 +1,20 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [create](./create.md)
# create
`@JvmOverloads fun create(domain: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, title: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, group_guid: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, tags: `[`Array`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = emptyArray(), deeplinks: `[`Array`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>> = emptyArray(), long_url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt#L99)
Converts a long url to a Bitlink and sets additional parameters.
See the [Bit.ly API](https://dev.bitly.com/v4/#operation/createFullBitlink) for more information.
### Parameters
`toJson` - Returns the full JSON response if `true`
**Oaran**
long_url The long URL.
**Return**
The shorten URL or JSON response, or on error, an empty string/JSON object.

View file

@ -0,0 +1,19 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [expand](./expand.md)
# expand
`@JvmOverloads fun expand(bitlink_id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt#L137)
Expands a Bitlink.
See the [Bit.ly API](https://dev.bitly.com/v4/#operation/expandBitlink) for more information.
### Parameters
`bitlink_id` - The bitlink ID.
`toJson` - Returns the full JSON response if `true`
**Return**
The long URL or JSON response, or on error, an empty string/JSON object.

View file

@ -0,0 +1,24 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](./index.md)
# Bitlinks
`open class Bitlinks` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt#L47)
Bitlinks methods implementation.
See the [Bitly API](https://dev.bitly.com/v4/#tag/Bitlinks) for more information.
### Constructors
| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | Bitlinks methods implementation.`Bitlinks(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` |
### Functions
| Name | Summary |
|---|---|
| [clicks](clicks.md) | Returns the click counts for a specified Bitlink.`fun clicks(bitlink: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, unit: `[`Units`](../-units/index.md)` = Units.DAY, units: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = -1, size: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 50, unit_reference: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [create](create.md) | Converts a long url to a Bitlink and sets additional parameters.`fun create(domain: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, title: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, group_guid: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, tags: `[`Array`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = emptyArray(), deeplinks: `[`Array`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)`<`[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>> = emptyArray(), long_url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [expand](expand.md) | Expands a Bitlink.`fun expand(bitlink_id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [shorten](shorten.md) | Shortens a long URL.`fun shorten(long_url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, group_guid: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, domain: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

View file

@ -0,0 +1,19 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [shorten](./shorten.md)
# shorten
`@JvmOverloads fun shorten(long_url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, group_guid: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, domain: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, toJson: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt#L185)
Shortens a long URL.
See the [Bit.ly API](https://dev.bitly.com/v4/#operation/createBitlink) for more information.
### Parameters
`long_url` - The long URL.
`toJson` - Returns the full JSON response if `true`
**Return**
The short URL or JSON response, or on error, the [long_url](shorten.md#net.thauvin.erik.bitly.Bitlinks$shorten(kotlin.String, kotlin.String, kotlin.String, kotlin.Boolean)/long_url) or an empty JSON object.

View file

@ -0,0 +1,41 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](index.md) / [&lt;init&gt;](./-init-.md)
# &lt;init&gt;
`Bitly(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Creates a new instance using an [API Access Token](access-token.md).
### Parameters
`accessToken` - The API access token.`Bitly(properties: `[`Properties`](https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`
Creates a new instance using a [Properties](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.util.Properties, kotlin.String)/properties) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.util.Properties, kotlin.String)/key).
### Parameters
`properties` - The properties.
`key` - The property key containing the [API Access Token](access-token.md).`Bitly(propertiesFilePath: `[`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`
Creates a new instance using a [Properties File Path](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.nio.file.Path, kotlin.String)/propertiesFilePath) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.nio.file.Path, kotlin.String)/key).
### Parameters
`propertiesFilePath` - The properties file path.
`key` - The property key containing the [API Access Token](access-token.md).`Bitly(propertiesFile: `[`File`](https://docs.oracle.com/javase/8/docs/api/java/io/File.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`
Creates a new instance using a [Properties File](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.io.File, kotlin.String)/propertiesFile) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.io.File, kotlin.String)/key).
### Parameters
`propertiesFile` - The properties file.
`key` - The property key containing the [API Access Token](access-token.md).`Bitly()`
Creates new instance.
**Constructor**
Creates new instance.

View file

@ -0,0 +1,11 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](index.md) / [accessToken](./access-token.md)
# accessToken
`var accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt#L51)
The API access token.
See [Generic Access Token](https://bitly.is/accesstoken) or
[Authentication](https://dev.bitly.com/v4/#section/Authentication).

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](index.md) / [bitlinks](./bitlinks.md)
# bitlinks
`fun bitlinks(): `[`Bitlinks`](../-bitlinks/index.md) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt#L106)
Bitlinks accessor.

View file

@ -0,0 +1,19 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](index.md) / [call](./call.md)
# call
`@JvmOverloads fun call(endPoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = emptyMap(), method: `[`Methods`](../-methods/index.md)` = Methods.POST): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt#L117)
Executes an API call.
### Parameters
`endPoint` - The REST endpoint. (eg. `https://api-ssl.bitly.com/v4/shorten`)
`params` - The request parameters kev/value map.
`method` - The submission [Method](../-methods/index.md).
**Return**
The response (JSON) from the API.

View file

@ -0,0 +1,26 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](./index.md)
# Bitly
`open class Bitly` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt#L45)
A simple implementation of the [Bitly Shortner API v4](https://dev.bitly.com/v4/).
### Constructors
| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | Creates a new instance using an [API Access Token](access-token.md).`Bitly(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`<br>Creates a new instance using a [Properties](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.util.Properties, kotlin.String)/properties) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.util.Properties, kotlin.String)/key).`Bitly(properties: `[`Properties`](https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`<br>Creates a new instance using a [Properties File Path](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.nio.file.Path, kotlin.String)/propertiesFilePath) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.nio.file.Path, kotlin.String)/key).`Bitly(propertiesFilePath: `[`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`<br>Creates a new instance using a [Properties File](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.io.File, kotlin.String)/propertiesFile) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$<init>(java.io.File, kotlin.String)/key).`Bitly(propertiesFile: `[`File`](https://docs.oracle.com/javase/8/docs/api/java/io/File.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.ENV_ACCESS_TOKEN)`<br>Creates new instance.`Bitly()` |
### Properties
| Name | Summary |
|---|---|
| [accessToken](access-token.md) | The API access token.`var accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
### Functions
| Name | Summary |
|---|---|
| [bitlinks](bitlinks.md) | Bitlinks accessor.`fun bitlinks(): `[`Bitlinks`](../-bitlinks/index.md) |
| [call](call.md) | Executes an API call.`fun call(endPoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = emptyMap(), method: `[`Methods`](../-methods/index.md)` = Methods.POST): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

View file

@ -0,0 +1,11 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [API_BASE_URL](./-a-p-i_-b-a-s-e_-u-r-l.md)
# API_BASE_URL
`const val API_BASE_URL: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt#L42)
The Bitly API base URL.
**Value**
`https://api-ssl.bitly.com/v4`

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [EMPTY](./-e-m-p-t-y.md)
# EMPTY
`const val EMPTY: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt#L51)
Empty String.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [EMPTY_JSON](./-e-m-p-t-y_-j-s-o-n.md)
# EMPTY_JSON
`const val EMPTY_JSON: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt#L54)
Empty JSON Object.

View file

@ -0,0 +1,11 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [ENV_ACCESS_TOKEN](./-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md)
# ENV_ACCESS_TOKEN
`const val ENV_ACCESS_TOKEN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt#L48)
The API access token environment variable.
**Value**
`BITLY_ACCESS_TOKEN`

View file

@ -0,0 +1,16 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](./index.md)
# Constants
`open class Constants` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt#L36)
Constants for this package.
### Companion Object Properties
| Name | Summary |
|---|---|
| [API_BASE_URL](-a-p-i_-b-a-s-e_-u-r-l.md) | The Bitly API base URL.`const val API_BASE_URL: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [EMPTY](-e-m-p-t-y.md) | Empty String.`const val EMPTY: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [EMPTY_JSON](-e-m-p-t-y_-j-s-o-n.md) | Empty JSON Object.`const val EMPTY_JSON: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [ENV_ACCESS_TOKEN](-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md) | The API access token environment variable.`const val ENV_ACCESS_TOKEN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Methods](index.md) / [DELETE](./-d-e-l-e-t-e.md)
# DELETE
`DELETE` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt#L39)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Methods](index.md) / [GET](./-g-e-t.md)
# GET
`GET` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt#L39)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Methods](index.md) / [PATCH](./-p-a-t-c-h.md)
# PATCH
`PATCH` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt#L39)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Methods](index.md) / [POST](./-p-o-s-t.md)
# POST
`POST` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt#L39)

View file

@ -0,0 +1,16 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Methods](./index.md)
# Methods
`enum class Methods` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt#L38)
HTTP methods.
### Enum Values
| Name | Summary |
|---|---|
| [DELETE](-d-e-l-e-t-e.md) | |
| [GET](-g-e-t.md) | |
| [PATCH](-p-a-t-c-h.md) | |
| [POST](-p-o-s-t.md) | |

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](index.md) / [DAY](./-d-a-y.md)
# DAY
`DAY` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L42)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](index.md) / [HOUR](./-h-o-u-r.md)
# HOUR
`HOUR` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L41)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](index.md) / [MINUTE](./-m-i-n-u-t-e.md)
# MINUTE
`MINUTE` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L40)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](index.md) / [MONTH](./-m-o-n-t-h.md)
# MONTH
`MONTH` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L44)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](index.md) / [WEEK](./-w-e-e-k.md)
# WEEK
`WEEK` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L43)

View file

@ -0,0 +1,17 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Units](./index.md)
# Units
`enum class Units` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Units.kt#L39)
Units of time.
### Enum Values
| Name | Summary |
|---|---|
| [MINUTE](-m-i-n-u-t-e.md) | |
| [HOUR](-h-o-u-r.md) | |
| [DAY](-d-a-y.md) | |
| [WEEK](-w-e-e-k.md) | |
| [MONTH](-m-o-n-t-h.md) | |

View file

@ -0,0 +1,21 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](index.md) / [call](./call.md)
# call
`@JvmOverloads fun call(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, endPoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`> = emptyMap(), method: `[`Methods`](../-methods/index.md)` = Methods.POST): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L65)
Executes an API call.
### Parameters
`accessToken` - The API access token.
`endPoint` - The REST endpoint. (eg. `https://api-ssl.bitly.com/v4/shorten`)
`params` - The request parameters kev/value map.
`method` - The submission [Method](../-methods/index.md).
**Return**
The response (JSON) from the API.

View file

@ -0,0 +1,22 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](./index.md)
# Utils
`open class Utils` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L50)
Useful functions.
### Companion Object Properties
| Name | Summary |
|---|---|
| [logger](logger.md) | The logger instance.`val logger: `[`Logger`](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html) |
### Companion Object Functions
| Name | Summary |
|---|---|
| [call](call.md) | Executes an API call.`fun call(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, endPoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`> = emptyMap(), method: `[`Methods`](../-methods/index.md)` = Methods.POST): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [isValidUrl](is-valid-url.md) | Validates a URL.`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.isValidUrl(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [removeHttp](remove-http.md) | Removes http(s) scheme from string.`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.removeHttp(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [toEndPoint](to-end-point.md) | Builds the full API endpoint URL using the [Constants.API_BASE_URL](../-constants/-a-p-i_-b-a-s-e_-u-r-l.md).`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.toEndPoint(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](index.md) / [isValidUrl](./is-valid-url.md)
# isValidUrl
`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.isValidUrl(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L148)
Validates a URL.

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](index.md) / [logger](./logger.md)
# logger
`val logger: `[`Logger`](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L53)
The logger instance.
**Getter**
The logger instance.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](index.md) / [removeHttp](./remove-http.md)
# removeHttp
`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.removeHttp(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L163)
Removes http(s) scheme from string.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Utils](index.md) / [toEndPoint](./to-end-point.md)
# toEndPoint
`fun `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`.toEndPoint(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt#L170)
Builds the full API endpoint URL using the [Constants.API_BASE_URL](../-constants/-a-p-i_-b-a-s-e_-u-r-l.md).

View file

@ -0,0 +1,14 @@
[docs](../index.md) / [net.thauvin.erik.bitly](./index.md)
## Package net.thauvin.erik.bitly
### Types
| Name | Summary |
|---|---|
| [Bitlinks](-bitlinks/index.md) | Bitlinks methods implementation.`open class Bitlinks` |
| [Bitly](-bitly/index.md) | A simple implementation of the [Bitly Shortner API v4](https://dev.bitly.com/v4/).`open class Bitly` |
| [Constants](-constants/index.md) | Constants for this package.`open class Constants` |
| [Methods](-methods/index.md) | HTTP methods.`enum class Methods` |
| [Units](-units/index.md) | Units of time.`enum class Units` |
| [Utils](-utils/index.md) | Useful functions.`open class Utils` |