From dd0079e7e8ecd350d8df28432651aa154f03fe3a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 3 Mar 2020 00:29:30 -0800 Subject: [PATCH] Added dokkaDocs --- build.gradle.kts | 45 +++++++++++++++-- config/dokka/packages.md | 6 ++- docs/alltypes/index.md | 50 ------------------- docs/index.md | 15 ------ .../-bitlinks/-init-.md | 10 ---- .../-bitlinks/clicks.md | 28 ----------- .../-bitlinks/create.md | 20 -------- .../-bitlinks/expand.md | 19 ------- .../net.thauvin.erik.bitly/-bitlinks/index.md | 24 --------- .../-bitlinks/shorten.md | 19 ------- docs/net.thauvin.erik.bitly/-bitly/-init-.md | 41 --------------- .../-bitly/access-token.md | 11 ---- .../net.thauvin.erik.bitly/-bitly/bitlinks.md | 8 --- docs/net.thauvin.erik.bitly/-bitly/call.md | 19 ------- docs/net.thauvin.erik.bitly/-bitly/index.md | 26 ---------- .../-constants/-a-p-i_-b-a-s-e_-u-r-l.md | 11 ---- .../-constants/-e-m-p-t-y.md | 8 --- .../-constants/-e-m-p-t-y_-j-s-o-n.md | 8 --- .../-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md | 11 ---- .../-constants/index.md | 16 ------ .../-methods/-d-e-l-e-t-e.md | 5 -- .../net.thauvin.erik.bitly/-methods/-g-e-t.md | 5 -- .../-methods/-p-a-t-c-h.md | 5 -- .../-methods/-p-o-s-t.md | 5 -- docs/net.thauvin.erik.bitly/-methods/index.md | 16 ------ docs/net.thauvin.erik.bitly/-units/-d-a-y.md | 5 -- .../net.thauvin.erik.bitly/-units/-h-o-u-r.md | 5 -- .../-units/-m-i-n-u-t-e.md | 5 -- .../-units/-m-o-n-t-h.md | 5 -- .../net.thauvin.erik.bitly/-units/-w-e-e-k.md | 5 -- docs/net.thauvin.erik.bitly/-units/index.md | 17 ------- docs/net.thauvin.erik.bitly/-utils/call.md | 21 -------- docs/net.thauvin.erik.bitly/-utils/index.md | 22 -------- .../-utils/is-valid-url.md | 8 --- docs/net.thauvin.erik.bitly/-utils/logger.md | 12 ----- .../-utils/remove-http.md | 8 --- .../-utils/to-end-point.md | 8 --- docs/net.thauvin.erik.bitly/index.md | 14 ------ docs/package-list | 4 -- .../kotlin/net/thauvin/erik/bitly/Bitlinks.kt | 2 +- .../kotlin/net/thauvin/erik/bitly/Bitly.kt | 8 +-- .../net/thauvin/erik/bitly/Constants.kt | 2 +- .../kotlin/net/thauvin/erik/bitly/Methods.kt | 2 +- .../kotlin/net/thauvin/erik/bitly/Units.kt | 2 +- .../kotlin/net/thauvin/erik/bitly/Utils.kt | 4 +- .../net/thauvin/erik/bitly/BitlyTest.kt | 11 +++- 46 files changed, 65 insertions(+), 536 deletions(-) delete mode 100644 docs/alltypes/index.md delete mode 100644 docs/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/-init-.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/clicks.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/create.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/expand.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitlinks/shorten.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitly/-init-.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitly/access-token.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitly/bitlinks.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitly/call.md delete mode 100644 docs/net.thauvin.erik.bitly/-bitly/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.md delete mode 100644 docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.md delete mode 100644 docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.md delete mode 100644 docs/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md delete mode 100644 docs/net.thauvin.erik.bitly/-constants/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.md delete mode 100644 docs/net.thauvin.erik.bitly/-methods/-g-e-t.md delete mode 100644 docs/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.md delete mode 100644 docs/net.thauvin.erik.bitly/-methods/-p-o-s-t.md delete mode 100644 docs/net.thauvin.erik.bitly/-methods/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/-d-a-y.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/-h-o-u-r.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/-m-o-n-t-h.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/-w-e-e-k.md delete mode 100644 docs/net.thauvin.erik.bitly/-units/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/call.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/index.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/is-valid-url.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/logger.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/remove-http.md delete mode 100644 docs/net.thauvin.erik.bitly/-utils/to-end-point.md delete mode 100644 docs/net.thauvin.erik.bitly/index.md delete mode 100644 docs/package-list diff --git a/build.gradle.kts b/build.gradle.kts index 61585f8..e24b7b2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import com.jfrog.bintray.gradle.tasks.BintrayUploadTask +import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.FileInputStream import java.util.Properties @@ -119,6 +120,25 @@ val javadocJar by tasks.creating(Jar::class) { group = JavaBasePlugin.DOCUMENTATION_GROUP } +val dokkaDocs by tasks.creating(DokkaTask::class) { + outputFormat = "gfm" + outputDirectory = "$projectDir" + + configuration { + moduleName = "docs" + sourceLink { + path = file("$projectDir/src/main/kotlin").toURI().toString().replace("file:", "") + url = "https://github.com/ethauvin/${project.name}/tree/master/src/main/kotlin" + lineSuffix = "#L" + } + + jdkVersion = 8 + + includes = listOf("config/dokka/packages.md") + includeNonPublic = false + } +} + tasks { withType { reports { @@ -146,13 +166,12 @@ tasks { } dokka { - outputFormat = "gfm" - outputDirectory = "$projectDir" + outputFormat = "html" + outputDirectory = "$buildDir/javadoc" configuration { - moduleName = "docs" sourceLink { - path = "$projectDir/src/main/kotlin" + path = file("$projectDir/src/main/kotlin").toURI().toString().replace("file:", "") url = "https://github.com/ethauvin/${project.name}/tree/master/src/main/kotlin" lineSuffix = "#L" } @@ -162,6 +181,7 @@ tasks { includes = listOf("config/dokka/packages.md") includeNonPublic = false } + dependsOn(dokkaDocs) } val copyToDeploy by registering(Copy::class) { @@ -226,7 +246,22 @@ bintray { githubRepo = gitHub githubReleaseNotesFile = "README.md" vcsUrl = "$mavenUrl.git" - setLabels("bitlinks", "bitly", "bitly-api", "bitly-v4", "java", "kotlin", "shorten", "shorten-urls", "shortener", "shortener-rest", "shortener-service", "shortens-links", "shorturl", "url-shortener") + setLabels( + "bitlinks", + "bitly", + "bitly-api", + "bitly-v4", + "java", + "kotlin", + "shorten", + "shorten-urls", + "shortener", + "shortener-rest", + "shortener-service", + "shortens-links", + "shorturl", + "url-shortener" + ) publicDownloadNumbers = true version.apply { name = project.version as String diff --git a/config/dokka/packages.md b/config/dokka/packages.md index 9a50a88..2cd2918 100644 --- a/config/dokka/packages.md +++ b/config/dokka/packages.md @@ -2,4 +2,8 @@ [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). +A simple implementation of the link shortening ([bitlinks](https://dev.bitly.com/v4/#tag/Bitlinks)) abilities of the [Bitly API v4](https://dev.bitly.com/v4). + +# Package net.thauvin.erik.bitly + +Provides the classes necessary to access the [Bitly API v4](https://dev.bitly.com/v4). diff --git a/docs/alltypes/index.md b/docs/alltypes/index.md deleted file mode 100644 index aa3123f..0000000 --- a/docs/alltypes/index.md +++ /dev/null @@ -1,50 +0,0 @@ - - -[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. - - diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 6f79633..0000000 --- a/docs/index.md +++ /dev/null @@ -1,15 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/-init-.md b/docs/net.thauvin.erik.bitly/-bitlinks/-init-.md deleted file mode 100644 index 04cef08..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/-init-.md +++ /dev/null @@ -1,10 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/clicks.md b/docs/net.thauvin.erik.bitly/-bitlinks/clicks.md deleted file mode 100644 index d4fc518..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/clicks.md +++ /dev/null @@ -1,28 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/create.md b/docs/net.thauvin.erik.bitly/-bitlinks/create.md deleted file mode 100644 index 5bbb8fc..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/create.md +++ /dev/null @@ -1,20 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/expand.md b/docs/net.thauvin.erik.bitly/-bitlinks/expand.md deleted file mode 100644 index 4888552..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/expand.md +++ /dev/null @@ -1,19 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/index.md b/docs/net.thauvin.erik.bitly/-bitlinks/index.md deleted file mode 100644 index cf44855..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/index.md +++ /dev/null @@ -1,24 +0,0 @@ -[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 | -|---|---| -| [<init>](-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) | diff --git a/docs/net.thauvin.erik.bitly/-bitlinks/shorten.md b/docs/net.thauvin.erik.bitly/-bitlinks/shorten.md deleted file mode 100644 index 1461a6f..0000000 --- a/docs/net.thauvin.erik.bitly/-bitlinks/shorten.md +++ /dev/null @@ -1,19 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitly/-init-.md b/docs/net.thauvin.erik.bitly/-bitly/-init-.md deleted file mode 100644 index 9e08e63..0000000 --- a/docs/net.thauvin.erik.bitly/-bitly/-init-.md +++ /dev/null @@ -1,41 +0,0 @@ -[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitly](index.md) / [<init>](./-init-.md) - -# <init> - -`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$(java.util.Properties, kotlin.String)/properties) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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$(java.nio.file.Path, kotlin.String)/propertiesFilePath) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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$(java.io.File, kotlin.String)/propertiesFile) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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. - diff --git a/docs/net.thauvin.erik.bitly/-bitly/access-token.md b/docs/net.thauvin.erik.bitly/-bitly/access-token.md deleted file mode 100644 index a782651..0000000 --- a/docs/net.thauvin.erik.bitly/-bitly/access-token.md +++ /dev/null @@ -1,11 +0,0 @@ -[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). - diff --git a/docs/net.thauvin.erik.bitly/-bitly/bitlinks.md b/docs/net.thauvin.erik.bitly/-bitly/bitlinks.md deleted file mode 100644 index d0618dc..0000000 --- a/docs/net.thauvin.erik.bitly/-bitly/bitlinks.md +++ /dev/null @@ -1,8 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitly/call.md b/docs/net.thauvin.erik.bitly/-bitly/call.md deleted file mode 100644 index 61cd18b..0000000 --- a/docs/net.thauvin.erik.bitly/-bitly/call.md +++ /dev/null @@ -1,19 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-bitly/index.md b/docs/net.thauvin.erik.bitly/-bitly/index.md deleted file mode 100644 index 1c1ea8f..0000000 --- a/docs/net.thauvin.erik.bitly/-bitly/index.md +++ /dev/null @@ -1,26 +0,0 @@ -[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 | -|---|---| -| [<init>](-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)`)`
Creates a new instance using a [Properties](-init-.md#net.thauvin.erik.bitly.Bitly$(java.util.Properties, kotlin.String)/properties) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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)`
Creates a new instance using a [Properties File Path](-init-.md#net.thauvin.erik.bitly.Bitly$(java.nio.file.Path, kotlin.String)/propertiesFilePath) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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)`
Creates a new instance using a [Properties File](-init-.md#net.thauvin.erik.bitly.Bitly$(java.io.File, kotlin.String)/propertiesFile) and [Property Key](-init-.md#net.thauvin.erik.bitly.Bitly$(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)`
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) | diff --git a/docs/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.md b/docs/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.md deleted file mode 100644 index beb111f..0000000 --- a/docs/net.thauvin.erik.bitly/-constants/-a-p-i_-b-a-s-e_-u-r-l.md +++ /dev/null @@ -1,11 +0,0 @@ -[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` - diff --git a/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.md b/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.md deleted file mode 100644 index d48cafe..0000000 --- a/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y.md +++ /dev/null @@ -1,8 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.md b/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.md deleted file mode 100644 index 1a701aa..0000000 --- a/docs/net.thauvin.erik.bitly/-constants/-e-m-p-t-y_-j-s-o-n.md +++ /dev/null @@ -1,8 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md b/docs/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md deleted file mode 100644 index c3ff8b3..0000000 --- a/docs/net.thauvin.erik.bitly/-constants/-e-n-v_-a-c-c-e-s-s_-t-o-k-e-n.md +++ /dev/null @@ -1,11 +0,0 @@ -[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` - diff --git a/docs/net.thauvin.erik.bitly/-constants/index.md b/docs/net.thauvin.erik.bitly/-constants/index.md deleted file mode 100644 index 63e8807..0000000 --- a/docs/net.thauvin.erik.bitly/-constants/index.md +++ /dev/null @@ -1,16 +0,0 @@ -[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) | diff --git a/docs/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.md b/docs/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.md deleted file mode 100644 index 3e1046e..0000000 --- a/docs/net.thauvin.erik.bitly/-methods/-d-e-l-e-t-e.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-methods/-g-e-t.md b/docs/net.thauvin.erik.bitly/-methods/-g-e-t.md deleted file mode 100644 index f916987..0000000 --- a/docs/net.thauvin.erik.bitly/-methods/-g-e-t.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.md b/docs/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.md deleted file mode 100644 index 7997f2b..0000000 --- a/docs/net.thauvin.erik.bitly/-methods/-p-a-t-c-h.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-methods/-p-o-s-t.md b/docs/net.thauvin.erik.bitly/-methods/-p-o-s-t.md deleted file mode 100644 index 323171e..0000000 --- a/docs/net.thauvin.erik.bitly/-methods/-p-o-s-t.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-methods/index.md b/docs/net.thauvin.erik.bitly/-methods/index.md deleted file mode 100644 index 07a140b..0000000 --- a/docs/net.thauvin.erik.bitly/-methods/index.md +++ /dev/null @@ -1,16 +0,0 @@ -[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) | | diff --git a/docs/net.thauvin.erik.bitly/-units/-d-a-y.md b/docs/net.thauvin.erik.bitly/-units/-d-a-y.md deleted file mode 100644 index 7c7b908..0000000 --- a/docs/net.thauvin.erik.bitly/-units/-d-a-y.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-units/-h-o-u-r.md b/docs/net.thauvin.erik.bitly/-units/-h-o-u-r.md deleted file mode 100644 index ddd5397..0000000 --- a/docs/net.thauvin.erik.bitly/-units/-h-o-u-r.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.md b/docs/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.md deleted file mode 100644 index d770582..0000000 --- a/docs/net.thauvin.erik.bitly/-units/-m-i-n-u-t-e.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-units/-m-o-n-t-h.md b/docs/net.thauvin.erik.bitly/-units/-m-o-n-t-h.md deleted file mode 100644 index 5d58554..0000000 --- a/docs/net.thauvin.erik.bitly/-units/-m-o-n-t-h.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-units/-w-e-e-k.md b/docs/net.thauvin.erik.bitly/-units/-w-e-e-k.md deleted file mode 100644 index 9c6fcdd..0000000 --- a/docs/net.thauvin.erik.bitly/-units/-w-e-e-k.md +++ /dev/null @@ -1,5 +0,0 @@ -[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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.bitly/-units/index.md b/docs/net.thauvin.erik.bitly/-units/index.md deleted file mode 100644 index 821128a..0000000 --- a/docs/net.thauvin.erik.bitly/-units/index.md +++ /dev/null @@ -1,17 +0,0 @@ -[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) | | diff --git a/docs/net.thauvin.erik.bitly/-utils/call.md b/docs/net.thauvin.erik.bitly/-utils/call.md deleted file mode 100644 index f25b653..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/call.md +++ /dev/null @@ -1,21 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-utils/index.md b/docs/net.thauvin.erik.bitly/-utils/index.md deleted file mode 100644 index 7b9d34a..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/index.md +++ /dev/null @@ -1,22 +0,0 @@ -[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) | diff --git a/docs/net.thauvin.erik.bitly/-utils/is-valid-url.md b/docs/net.thauvin.erik.bitly/-utils/is-valid-url.md deleted file mode 100644 index 8e7ba41..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/is-valid-url.md +++ /dev/null @@ -1,8 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-utils/logger.md b/docs/net.thauvin.erik.bitly/-utils/logger.md deleted file mode 100644 index a788d7a..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/logger.md +++ /dev/null @@ -1,12 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-utils/remove-http.md b/docs/net.thauvin.erik.bitly/-utils/remove-http.md deleted file mode 100644 index 2b6a221..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/remove-http.md +++ /dev/null @@ -1,8 +0,0 @@ -[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. - diff --git a/docs/net.thauvin.erik.bitly/-utils/to-end-point.md b/docs/net.thauvin.erik.bitly/-utils/to-end-point.md deleted file mode 100644 index c601025..0000000 --- a/docs/net.thauvin.erik.bitly/-utils/to-end-point.md +++ /dev/null @@ -1,8 +0,0 @@ -[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). - diff --git a/docs/net.thauvin.erik.bitly/index.md b/docs/net.thauvin.erik.bitly/index.md deleted file mode 100644 index 724dc8b..0000000 --- a/docs/net.thauvin.erik.bitly/index.md +++ /dev/null @@ -1,14 +0,0 @@ -[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` | diff --git a/docs/package-list b/docs/package-list deleted file mode 100644 index 349c78e..0000000 --- a/docs/package-list +++ /dev/null @@ -1,4 +0,0 @@ -$dokka.format:gfm -$dokka.linkExtension:md - -net.thauvin.erik.bitly diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt b/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt index e19f78a..a9cf4ab 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt @@ -40,7 +40,7 @@ import org.json.JSONObject import java.util.logging.Level /** - * Bitlinks methods implementation. + * Provides functions to create and manage [Bitlinks](https://dev.bitly.com/v4/#tag/Bitlinks). * * See the [Bitly API](https://dev.bitly.com/v4/#tag/Bitlinks) for more information. */ diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt b/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt index 849f361..ae24cf9 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Bitly.kt @@ -38,7 +38,7 @@ import java.nio.file.Path import java.util.Properties /** - * A simple implementation of the [Bitly Shortner API v4](https://dev.bitly.com/v4/). + * Provides access to the [Bitly API v4](https://dev.bitly.com/v4). * * @constructor Creates new instance. */ @@ -101,7 +101,7 @@ open class Bitly() { constructor(propertiesFile: File, key: String = Constants.ENV_ACCESS_TOKEN) : this(propertiesFile.toPath(), key) /** - * Bitlinks accessor. + * Returns a new [Bitlinks] instance. */ fun bitlinks(): Bitlinks = Bitlinks(accessToken) @@ -109,12 +109,12 @@ open class Bitly() { * Executes an API call. * * @param endPoint The REST endpoint. (eg. `https://api-ssl.bitly.com/v4/shorten`) - * @param params The request parameters kev/value map. + * @param params The request parameters key/value map. * @param method The submission [Method][Methods]. * @return The response (JSON) from the API. */ @JvmOverloads - fun call(endPoint: String, params: Map = emptyMap(), method: Methods = Methods.POST): String { + fun call(endPoint: String, params: Map = emptyMap(), method: Methods = Methods.POST): String { return Utils.call(accessToken, endPoint, params, method) } } diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt b/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt index 1122737..d8466df 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Constants.kt @@ -32,7 +32,7 @@ package net.thauvin.erik.bitly -/** Constants for this package. **/ +/** Provides the constants for this package. */ open class Constants private constructor() { companion object Constants { /** The Bitly API base URL. diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt b/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt index d8cb524..4911100 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Methods.kt @@ -33,7 +33,7 @@ package net.thauvin.erik.bitly /** - * HTTP methods. + * Provides HTTP methods definitions. */ enum class Methods { DELETE, GET, PATCH, POST diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Units.kt b/src/main/kotlin/net/thauvin/erik/bitly/Units.kt index 78a3f51..c018449 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Units.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Units.kt @@ -33,7 +33,7 @@ package net.thauvin.erik.bitly /** - * Units of time. + * Provides units of time definitions. */ @Suppress("unused") enum class Units { diff --git a/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt b/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt index 630d67a..b6b1940 100644 --- a/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt +++ b/src/main/kotlin/net/thauvin/erik/bitly/Utils.kt @@ -46,7 +46,7 @@ import java.net.URL import java.util.logging.Level import java.util.logging.Logger -/** Useful functions. */ +/** Provides useful generic functions. */ open class Utils private constructor() { companion object { /** The logger instance. */ @@ -57,7 +57,7 @@ open class Utils private constructor() { * * @param accessToken The API access token. * @param endPoint The REST endpoint. (eg. `https://api-ssl.bitly.com/v4/shorten`) - * @param params The request parameters kev/value map. + * @param params The request parameters key/value map. * @param method The submission [Method][Methods]. * @return The response (JSON) from the API. */ diff --git a/src/test/kotlin/net/thauvin/erik/bitly/BitlyTest.kt b/src/test/kotlin/net/thauvin/erik/bitly/BitlyTest.kt index 2f7967c..a3d209e 100644 --- a/src/test/kotlin/net/thauvin/erik/bitly/BitlyTest.kt +++ b/src/test/kotlin/net/thauvin/erik/bitly/BitlyTest.kt @@ -127,6 +127,15 @@ class BitlyTest { @Test fun `create bitlink`() { - assertEquals(shortUrl, bitly.bitlinks().create(domain = "bit.ly", title = "Erik's Weblog", tags = arrayOf("erik", "thauvin", "blog", "weblog"), long_url = longUrl)) + assertEquals( + shortUrl, + bitly.bitlinks() + .create( + domain = "bit.ly", + title = "Erik's Weblog", + tags = arrayOf("erik", "thauvin", "blog", "weblog"), + long_url = longUrl + ) + ) } }