diff --git a/README.md b/README.md index 90ebaa7..b02dbaf 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,6 @@ bitly.call("/user".toEndPoint(), method = Methods.GET) } ``` - View [Example](https://github.com/ethauvin/bitly-shorten/blob/master/examples/src/main/kotlin/com/example/BitlyRetrieve.kt) + +### More +If all else fails, there's always more [Documentation](https://github.com/ethauvin/bitly-shorten/blob/master/docs/bitly-shorten/index.html). diff --git a/build.gradle.kts b/build.gradle.kts index 306c265..e79d69b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -147,11 +147,11 @@ tasks { dokka { outputFormat = "html" - outputDirectory = "$buildDir/javadoc" + outputDirectory = "$projectDir/docs" configuration { sourceLink { - path = "src/main/kotlin" + path = "$projectDir/src/main/kotlin" url = "https://github.com/ethauvin/${project.name}/tree/master/src/main/kotlin" lineSuffix = "#L" } diff --git a/docs/bitly-shorten/alltypes/index.html b/docs/bitly-shorten/alltypes/index.html new file mode 100644 index 0000000..0f4c545 --- /dev/null +++ b/docs/bitly-shorten/alltypes/index.html @@ -0,0 +1,39 @@ + + + +alltypes - bitly-shorten + + + +

Bitly Shortener for Kotlin/Java

+

All Types

+ + + +
net.thauvin.erik.bitly.Bitlinks
+

Bitlinks methods implementation.

+ + +
net.thauvin.erik.bitly.Bitly
+

A simple implementation of the Bitly Shortner API v4.

+ + +
net.thauvin.erik.bitly.Constants
+

Constants for this package.

+ + +
net.thauvin.erik.bitly.Methods
+

HTTP methods.

+ + +
net.thauvin.erik.bitly.Units
+

Units of time.

+ + +
net.thauvin.erik.bitly.Utils
+

Useful functions.

+ + +
+ + diff --git a/docs/bitly-shorten/index-outline.html b/docs/bitly-shorten/index-outline.html new file mode 100644 index 0000000..6571c45 --- /dev/null +++ b/docs/bitly-shorten/index-outline.html @@ -0,0 +1,251 @@ + + + +Module Contents + + + +bitly-shorten
+ + + diff --git a/docs/bitly-shorten/index.html b/docs/bitly-shorten/index.html new file mode 100644 index 0000000..4267299 --- /dev/null +++ b/docs/bitly-shorten/index.html @@ -0,0 +1,27 @@ + + + +bitly-shorten + + + +bitly-shorten
+
+

Bitly Shortener for Kotlin/Java

+

A simple implementation of the link shortening (bitlinks) abilities of the Bitly v4 API.

+

Packages

+ + + + + + + +
+

net.thauvin.erik.bitly

+
+
+

Index

+All Types + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/-init-.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/-init-.html new file mode 100644 index 0000000..ac0b3e3 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/-init-.html @@ -0,0 +1,16 @@ + + + +Bitlinks.<init> - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks / <init>
+
+

<init>

+ +Bitlinks(accessToken: String) +

Bitlinks methods implementation.

+

See the Bitly API for more information.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/clicks.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/clicks.html new file mode 100644 index 0000000..548380e --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/clicks.html @@ -0,0 +1,32 @@ + + + +Bitlinks.clicks - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks / clicks
+
+

clicks

+ +@JvmOverloads fun clicks(bitlink: String, unit: Units = Units.DAY, units: Int = -1, size: Int = 50, unit_reference: String = Constants.EMPTY, toJson: Boolean = false): String (source) +

Returns the click counts for a specified Bitlink.

+

See the Bitly API 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.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/create.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/create.html new file mode 100644 index 0000000..96b2e19 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/create.html @@ -0,0 +1,23 @@ + + + +Bitlinks.create - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks / create
+
+

create

+ +@JvmOverloads 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 (source) +

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

+

See the Bit.ly API 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.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/expand.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/expand.html new file mode 100644 index 0000000..892ef04 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/expand.html @@ -0,0 +1,23 @@ + + + +Bitlinks.expand - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks / expand
+
+

expand

+ +@JvmOverloads fun expand(bitlink_id: String, toJson: Boolean = false): String (source) +

Expands a Bitlink.

+

See the Bit.ly API 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.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/index.html new file mode 100644 index 0000000..6c49566 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/index.html @@ -0,0 +1,65 @@ + + + +Bitlinks - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks
+
+

Bitlinks

+open class Bitlinks (source) +

Bitlinks methods implementation.

+

See the Bitly API for more information.

+

Constructors

+ + + + + + + +
+

<init>

+
+

Bitlinks methods implementation.

+Bitlinks(accessToken: String)
+

Functions

+ + + + + + + + + + + + + + + + + + + +
+

clicks

+
+

Returns the click counts for a specified Bitlink.

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

create

+
+

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

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

expand

+
+

Expands a Bitlink.

+fun expand(bitlink_id: String, toJson: Boolean = false): String
+

shorten

+
+

Shortens a long URL.

+fun shorten(long_url: String, group_guid: String = Constants.EMPTY, domain: String = Constants.EMPTY, toJson: Boolean = false): String
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/shorten.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/shorten.html new file mode 100644 index 0000000..4daaa0a --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitlinks/shorten.html @@ -0,0 +1,23 @@ + + + +Bitlinks.shorten - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitlinks / shorten
+
+

shorten

+ +@JvmOverloads fun shorten(long_url: String, group_guid: String = Constants.EMPTY, domain: String = Constants.EMPTY, toJson: Boolean = false): String (source) +

Shortens a long URL.

+

See the Bit.ly API 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 or an empty JSON object.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/-init-.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/-init-.html new file mode 100644 index 0000000..c9a3a5a --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/-init-.html @@ -0,0 +1,47 @@ + + + +Bitly.<init> - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / <init>
+
+

<init>

+ +Bitly(accessToken: String) +

Creates a new instance using an API Access Token.

+

Parameters

+

+accessToken - The API access token.

+ +Bitly(properties: Properties, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates a new instance using a Properties and Property Key.

+

Parameters

+

+properties - The properties.

+

+key - The property key containing the API Access Token.

+ +Bitly(propertiesFilePath: Path, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates a new instance using a Properties File Path and Property Key.

+

Parameters

+

+propertiesFilePath - The properties file path.

+

+key - The property key containing the API Access Token.

+ +Bitly(propertiesFile: File, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates a new instance using a Properties File and Property Key.

+

Parameters

+

+propertiesFile - The properties file.

+

+key - The property key containing the API Access Token.

+ +Bitly() +

Creates new instance.

+

Constructor
+Creates new instance.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/access-token.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/access-token.html new file mode 100644 index 0000000..f8b1da1 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/access-token.html @@ -0,0 +1,17 @@ + + + +Bitly.accessToken - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / accessToken
+
+

accessToken

+ +var accessToken: String (source) +

The API access token.

+

See Generic Access Token or +Authentication.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/bitlinks.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/bitlinks.html new file mode 100644 index 0000000..f241281 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/bitlinks.html @@ -0,0 +1,15 @@ + + + +Bitly.bitlinks - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / bitlinks
+
+

bitlinks

+ +fun bitlinks(): Bitlinks (source) +

Bitlinks accessor.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/call.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/call.html new file mode 100644 index 0000000..a60c55f --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/call.html @@ -0,0 +1,24 @@ + + + +Bitly.call - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / call
+
+

call

+ +@JvmOverloads fun call(endPoint: String, params: Map<String, String> = emptyMap(), method: Methods = Methods.POST): String (source) +

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.

+

Return
+The response (JSON) from the API.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/get-access-token.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/get-access-token.html new file mode 100644 index 0000000..691d2d0 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/get-access-token.html @@ -0,0 +1,16 @@ + + + +Bitly.getAccessToken - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / getAccessToken
+
+

getAccessToken

+@NotNull fun getAccessToken(): java.lang.String +

The API access token.

+

See Generic Access Token or +Authentication.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/index.html new file mode 100644 index 0000000..628311b --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/index.html @@ -0,0 +1,69 @@ + + + +Bitly - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly
+
+

Bitly

+open class Bitly (source) +

A simple implementation of the Bitly Shortner API v4.

+

Constructors

+ + + + + + + +
+

<init>

+
+

Creates a new instance using an API Access Token.

+Bitly(accessToken: String) +

Creates a new instance using a Properties and Property Key.

+Bitly(properties: Properties, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates a new instance using a Properties File Path and Property Key.

+Bitly(propertiesFilePath: Path, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates a new instance using a Properties File and Property Key.

+Bitly(propertiesFile: File, key: String = Constants.ENV_ACCESS_TOKEN) +

Creates new instance.

+Bitly()
+

Properties

+ + + + + + + +
+

accessToken

+
+

The API access token.

+var accessToken: String
+

Functions

+ + + + + + + + + + + +
+

bitlinks

+
+

Bitlinks accessor.

+fun bitlinks(): Bitlinks
+

call

+
+

Executes an API call.

+fun call(endPoint: String, params: Map<String, String> = emptyMap(), method: Methods = Methods.POST): String
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/set-access-token.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/set-access-token.html new file mode 100644 index 0000000..6c2d99e --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-bitly/set-access-token.html @@ -0,0 +1,16 @@ + + + +Bitly.setAccessToken - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Bitly / setAccessToken
+
+

setAccessToken

+@<?> fun setAccessToken(@NotNull p: java.lang.String): void +

The API access token.

+

See Generic Access Token or +Authentication.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.html new file mode 100644 index 0000000..67dc738 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.html @@ -0,0 +1,17 @@ + + + +Constants.API_BASE_URL - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants / API_BASE_URL
+
+

API_BASE_URL

+ +const val API_BASE_URL: String (source) +

The Bitly API base URL.

+

Value
+https://api-ssl.bitly.com/v4

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-constants.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-constants.html new file mode 100644 index 0000000..1ed9a98 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-constants.html @@ -0,0 +1,14 @@ + + + +Constants.Constants - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants / Constants
+
+

Constants

+Constants
+static class Constants + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.html new file mode 100644 index 0000000..cfbba2a --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.html @@ -0,0 +1,15 @@ + + + +Constants.EMPTY - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants / EMPTY
+
+

EMPTY

+ +const val EMPTY: String (source) +

Empty String.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.html new file mode 100644 index 0000000..348a296 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.html @@ -0,0 +1,15 @@ + + + +Constants.EMPTY_JSON - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants / EMPTY_JSON
+
+

EMPTY_JSON

+ +const val EMPTY_JSON: String (source) +

Empty JSON Object.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.html new file mode 100644 index 0000000..f138b4e --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.html @@ -0,0 +1,17 @@ + + + +Constants.ENV_ACCESS_TOKEN - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants / ENV_ACCESS_TOKEN
+
+

ENV_ACCESS_TOKEN

+ +const val ENV_ACCESS_TOKEN: String (source) +

The API access token environment variable.

+

Value
+BITLY_ACCESS_TOKEN

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/index.html new file mode 100644 index 0000000..2202c1b --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-constants/index.html @@ -0,0 +1,51 @@ + + + +Constants - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Constants
+
+

Constants

+open class Constants (source) +

Constants for this package.

+

Companion Object Properties

+ + + + + + + + + + + + + + + + + + + +
+

API_BASE_URL

+
+

The Bitly API base URL.

+const val API_BASE_URL: String
+

EMPTY

+
+

Empty String.

+const val EMPTY: String
+

EMPTY_JSON

+
+

Empty JSON Object.

+const val EMPTY_JSON: String
+

ENV_ACCESS_TOKEN

+
+

The API access token environment variable.

+const val ENV_ACCESS_TOKEN: String
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.html new file mode 100644 index 0000000..ff4b489 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.html @@ -0,0 +1,14 @@ + + + +Methods.DELETE - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Methods / DELETE
+
+

DELETE

+ +DELETE (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-g-e-t.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-g-e-t.html new file mode 100644 index 0000000..1f8b253 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-g-e-t.html @@ -0,0 +1,14 @@ + + + +Methods.GET - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Methods / GET
+
+

GET

+ +GET (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.html new file mode 100644 index 0000000..c5385f5 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.html @@ -0,0 +1,14 @@ + + + +Methods.PATCH - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Methods / PATCH
+
+

PATCH

+ +PATCH (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-o-s-t.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-o-s-t.html new file mode 100644 index 0000000..6a29437 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/-p-o-s-t.html @@ -0,0 +1,14 @@ + + + +Methods.POST - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Methods / POST
+
+

POST

+ +POST (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/index.html new file mode 100644 index 0000000..cc99cdf --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-methods/index.html @@ -0,0 +1,47 @@ + + + +Methods - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Methods
+
+

Methods

+enum class Methods (source) +

HTTP methods.

+

Enum Values

+ + + + + + + + + + + + + + + + + + + +
+

DELETE

+
+
+

GET

+
+
+

PATCH

+
+
+

POST

+
+
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-d-a-y.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-d-a-y.html new file mode 100644 index 0000000..2421928 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-d-a-y.html @@ -0,0 +1,14 @@ + + + +Units.DAY - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units / DAY
+
+

DAY

+ +DAY (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-h-o-u-r.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-h-o-u-r.html new file mode 100644 index 0000000..963a6bc --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-h-o-u-r.html @@ -0,0 +1,14 @@ + + + +Units.HOUR - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units / HOUR
+
+

HOUR

+ +HOUR (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.html new file mode 100644 index 0000000..e488638 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.html @@ -0,0 +1,14 @@ + + + +Units.MINUTE - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units / MINUTE
+
+

MINUTE

+ +MINUTE (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-o-n-t-h.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-o-n-t-h.html new file mode 100644 index 0000000..bcdb288 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-m-o-n-t-h.html @@ -0,0 +1,14 @@ + + + +Units.MONTH - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units / MONTH
+
+

MONTH

+ +MONTH (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-w-e-e-k.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-w-e-e-k.html new file mode 100644 index 0000000..3b82a76 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/-w-e-e-k.html @@ -0,0 +1,14 @@ + + + +Units.WEEK - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units / WEEK
+
+

WEEK

+ +WEEK (source) + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-units/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/index.html new file mode 100644 index 0000000..1781d14 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-units/index.html @@ -0,0 +1,54 @@ + + + +Units - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Units
+
+

Units

+enum class Units (source) +

Units of time.

+

Enum Values

+ + + + + + + + + + + + + + + + + + + + + + + +
+

MINUTE

+
+
+

HOUR

+
+
+

DAY

+
+
+

WEEK

+
+
+

MONTH

+
+
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion.html new file mode 100644 index 0000000..59a3769 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion.html @@ -0,0 +1,13 @@ + + + +Utils.Companion - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion
+
+

Companion

+Companion + + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/call.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/call.html new file mode 100644 index 0000000..69df60b --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/call.html @@ -0,0 +1,27 @@ + + + +Utils.Companion.call - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion / call
+
+

call

+@JvmOverloads @NotNull fun call(@NotNull accessToken: java.lang.String, @NotNull endPoint: java.lang.String, @NotNull params: java.util.Map<java.lang.String, ? extends java.lang.Object>, @NotNull method: Methods): java.lang.String
+@JvmOverloads @NotNull fun call(@NotNull accessToken: java.lang.String, @NotNull endPoint: java.lang.String, @NotNull params: java.util.Map<java.lang.String, ? extends java.lang.Object>): java.lang.String
+@JvmOverloads @NotNull fun call(@NotNull accessToken: java.lang.String, @NotNull endPoint: java.lang.String): java.lang.String +

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.

+

Return
+The response (JSON) from the API.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/get-logger.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/get-logger.html new file mode 100644 index 0000000..d367050 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/get-logger.html @@ -0,0 +1,14 @@ + + + +Utils.Companion.getLogger - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion / getLogger
+
+

getLogger

+@NotNull fun getLogger(): java.util.logging.Logger +

The logger instance.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/index.html new file mode 100644 index 0000000..53b30a3 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/index.html @@ -0,0 +1,60 @@ + + + +Utils.Companion - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion
+
+

Companion

+static class Companion +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + +
+

call

+
+

Executes an API call.

+fun call(accessToken: java.lang.String, endPoint: java.lang.String, params: java.util.Map<java.lang.String, ? extends java.lang.Object>, method: Methods): java.lang.String
+fun call(accessToken: java.lang.String, endPoint: java.lang.String, params: java.util.Map<java.lang.String, ? extends java.lang.Object>): java.lang.String
+fun call(accessToken: java.lang.String, endPoint: java.lang.String): java.lang.String
+

getLogger

+
+

The logger instance.

+fun getLogger(): java.util.logging.Logger
+

isValidUrl

+
+

Validates a URL.

+fun isValidUrl($this$isValidUrl: java.lang.String): boolean
+

removeHttp

+
+

Removes http(s) scheme from string.

+fun removeHttp($this$removeHttp: java.lang.String): java.lang.String
+

toEndPoint

+
+

Builds the full API endpoint URL using the Constants.API_BASE_URL.

+fun toEndPoint($this$toEndPoint: java.lang.String): java.lang.String
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/is-valid-url.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/is-valid-url.html new file mode 100644 index 0000000..aaa9939 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/is-valid-url.html @@ -0,0 +1,14 @@ + + + +Utils.Companion.isValidUrl - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion / isValidUrl
+
+

isValidUrl

+@<?> fun isValidUrl(@NotNull $this$isValidUrl: java.lang.String): boolean +

Validates a URL.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/remove-http.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/remove-http.html new file mode 100644 index 0000000..381ac5e --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/remove-http.html @@ -0,0 +1,14 @@ + + + +Utils.Companion.removeHttp - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion / removeHttp
+
+

removeHttp

+@NotNull fun removeHttp(@NotNull $this$removeHttp: java.lang.String): java.lang.String +

Removes http(s) scheme from string.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/to-end-point.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/to-end-point.html new file mode 100644 index 0000000..716cde2 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/-companion/to-end-point.html @@ -0,0 +1,14 @@ + + + +Utils.Companion.toEndPoint - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / Companion / toEndPoint
+
+

toEndPoint

+@NotNull fun toEndPoint(@NotNull $this$toEndPoint: java.lang.String): java.lang.String +

Builds the full API endpoint URL using the Constants.API_BASE_URL.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/call.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/call.html new file mode 100644 index 0000000..dc00163 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/call.html @@ -0,0 +1,26 @@ + + + +Utils.call - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / call
+
+

call

+ +@JvmOverloads fun call(accessToken: String, endPoint: String, params: Map<String, Any> = emptyMap(), method: Methods = Methods.POST): String (source) +

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.

+

Return
+The response (JSON) from the API.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/index.html new file mode 100644 index 0000000..c58a56a --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/index.html @@ -0,0 +1,64 @@ + + + +Utils - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils
+
+

Utils

+open class Utils (source) +

Useful functions.

+

Companion Object Properties

+ + + + + + + +
+

logger

+
+

The logger instance.

+val logger: Logger
+

Companion Object Functions

+ + + + + + + + + + + + + + + + + + + +
+

call

+
+

Executes an API call.

+fun call(accessToken: String, endPoint: String, params: Map<String, Any> = emptyMap(), method: Methods = Methods.POST): String
+

isValidUrl

+
+

Validates a URL.

+fun String.isValidUrl(): Boolean
+

removeHttp

+
+

Removes http(s) scheme from string.

+fun String.removeHttp(): String
+

toEndPoint

+
+

Builds the full API endpoint URL using the Constants.API_BASE_URL.

+fun String.toEndPoint(): String
+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/is-valid-url.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/is-valid-url.html new file mode 100644 index 0000000..b7dc684 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/is-valid-url.html @@ -0,0 +1,15 @@ + + + +Utils.isValidUrl - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / isValidUrl
+
+

isValidUrl

+ +fun String.isValidUrl(): Boolean (source) +

Validates a URL.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/logger.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/logger.html new file mode 100644 index 0000000..55c5713 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/logger.html @@ -0,0 +1,18 @@ + + + +Utils.logger - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / logger
+
+

logger

+ +val logger: Logger (source) +

The logger instance.

+

Getter
+

The logger instance.

+

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/remove-http.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/remove-http.html new file mode 100644 index 0000000..ae13bb2 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/remove-http.html @@ -0,0 +1,15 @@ + + + +Utils.removeHttp - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / removeHttp
+
+

removeHttp

+ +fun String.removeHttp(): String (source) +

Removes http(s) scheme from string.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/to-end-point.html b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/to-end-point.html new file mode 100644 index 0000000..f867652 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/-utils/to-end-point.html @@ -0,0 +1,15 @@ + + + +Utils.toEndPoint - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly / Utils / toEndPoint
+
+

toEndPoint

+ +fun String.toEndPoint(): String (source) +

Builds the full API endpoint URL using the Constants.API_BASE_URL.

+ + diff --git a/docs/bitly-shorten/net.thauvin.erik.bitly/index.html b/docs/bitly-shorten/net.thauvin.erik.bitly/index.html new file mode 100644 index 0000000..1234ab7 --- /dev/null +++ b/docs/bitly-shorten/net.thauvin.erik.bitly/index.html @@ -0,0 +1,65 @@ + + + +net.thauvin.erik.bitly - bitly-shorten + + + +bitly-shorten / net.thauvin.erik.bitly
+
+

Package net.thauvin.erik.bitly

+

Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Bitlinks

+
+

Bitlinks methods implementation.

+open class Bitlinks
+

Bitly

+
+

A simple implementation of the Bitly Shortner API v4.

+open class Bitly
+

Constants

+
+

Constants for this package.

+open class Constants
+

Methods

+
+

HTTP methods.

+enum class Methods
+

Units

+
+

Units of time.

+enum class Units
+

Utils

+
+

Useful functions.

+open class Utils
+ + diff --git a/docs/bitly-shorten/package-list b/docs/bitly-shorten/package-list new file mode 100644 index 0000000..1630f90 --- /dev/null +++ b/docs/bitly-shorten/package-list @@ -0,0 +1,4 @@ +$dokka.format:html +$dokka.linkExtension:html + +net.thauvin.erik.bitly diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 0000000..914be69 --- /dev/null +++ b/docs/style.css @@ -0,0 +1,283 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:300i,400,700); + +body, table { + padding:50px; + font:14px/1.5 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + color:#555; + font-weight:300; + margin-left: auto; + margin-right: auto; + max-width: 1440px; +} + +.keyword { + color:black; + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + font-size:12px; +} + +.symbol { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + font-size:12px; +} + +.identifier { + color: darkblue; + font-size:12px; + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; +} + +h1, h2, h3, h4, h5, h6 { + color:#222; + margin:0 0 20px; +} + +p, ul, ol, table, pre, dl { + margin:0 0 20px; +} + +h1, h2, h3 { + line-height:1.1; +} + +h1 { + font-size:28px; +} + +h2 { + color:#393939; +} + +h3, h4, h5, h6 { + color:#494949; +} + +a { + color:#258aaf; + font-weight:400; + text-decoration:none; +} + +a:hover { + color: inherit; + text-decoration:underline; +} + +a small { + font-size:11px; + color:#555; + margin-top:-0.6em; + display:block; +} + +.wrapper { + width:860px; + margin:0 auto; +} + +blockquote { + border-left:1px solid #e5e5e5; + margin:0; + padding:0 0 0 20px; + font-style:italic; +} + +code, pre { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + color:#333; + font-size:12px; +} + +pre { + display: block; +/* + padding:8px 8px; + background: #f8f8f8; + border-radius:5px; + border:1px solid #e5e5e5; +*/ + overflow-x: auto; +} + +table { + width:100%; + border-collapse:collapse; +} + +th, td { + text-align:left; + vertical-align: top; + padding:5px 10px; +} + +dt { + color:#444; + font-weight:700; +} + +th { + color:#444; +} + +img { + max-width:100%; +} + +header { + width:270px; + float:left; + position:fixed; +} + +header ul { + list-style:none; + height:40px; + + padding:0; + + background: #eee; + background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); + background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + + border-radius:5px; + border:1px solid #d2d2d2; + box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0; + width:270px; +} + +header li { + width:89px; + float:left; + border-right:1px solid #d2d2d2; + height:40px; +} + +header ul a { + line-height:1; + font-size:11px; + color:#999; + display:block; + text-align:center; + padding-top:6px; + height:40px; +} + +strong { + color:#222; + font-weight:700; +} + +header ul li + li { + width:88px; + border-left:1px solid #fff; +} + +header ul li + li + li { + border-right:none; + width:89px; +} + +header ul a strong { + font-size:14px; + display:block; + color:#222; +} + +section { + width:500px; + float:right; + padding-bottom:50px; +} + +small { + font-size:11px; +} + +hr { + border:0; + background:#e5e5e5; + height:1px; + margin:0 0 20px; +} + +footer { + width:270px; + float:left; + position:fixed; + bottom:50px; +} + +@media print, screen and (max-width: 960px) { + + div.wrapper { + width:auto; + margin:0; + } + + header, section, footer { + float:none; + position:static; + width:auto; + } + + header { + padding-right:320px; + } + + section { + border:1px solid #e5e5e5; + border-width:1px 0; + padding:20px 0; + margin:0 0 20px; + } + + header a small { + display:inline; + } + + header ul { + position:absolute; + right:50px; + top:52px; + } +} + +@media print, screen and (max-width: 720px) { + body { + word-wrap:break-word; + } + + header { + padding:0; + } + + header ul, header p.view { + position:static; + } + + pre, code { + word-wrap:normal; + } +} + +@media print, screen and (max-width: 480px) { + body { + padding:15px; + } + + header ul { + display:none; + } +} + +@media print { + body { + padding:0.4in; + font-size:12pt; + color:#444; + } +}