Added CallResponse docs.

This commit is contained in:
Erik C. Thauvin 2020-03-03 21:54:24 -08:00
parent 2760b8e3a4
commit 353927580d
13 changed files with 110 additions and 1 deletions

View file

@ -0,0 +1,20 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Bitlinks](index.md) / [update](./update.md)
# update
`@JvmOverloads fun update(bitlink: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, references: `[`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(), archived: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, 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(), created_at: `[`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, 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(), created_by: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, long_url: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, client_id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, custom_bitlinks: `[`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(), link: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY, id: `[`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#L222)
Updates fields in the Bitlink.
See the [Bit.ly API](https://dev.bitly.com/v4/#operation/updateBitlink) for more information.
### Parameters
`toJson` - Returns the full JSON response if `true`
**Oaran**
bitlink A Bitlink made of the domain and hash.
**Return**
`true` is the update was successful, `false` otherwise, or JSON response.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](index.md) / [&lt;init&gt;](./-init-.md)
# &lt;init&gt;
`CallResponse(body: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY_JSON, resultCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = -1)`
Provides a data class to hold the JSON response.

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](index.md) / [body](./body.md)
# body
`var body: `[`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/CallResponse.kt#L40)

View file

@ -0,0 +1,27 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](./index.md)
# CallResponse
`data class CallResponse` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/CallResponse.kt#L40)
Provides a data class to hold the JSON response.
### Constructors
| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | Provides a data class to hold the JSON response.`CallResponse(body: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = Constants.EMPTY_JSON, resultCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = -1)` |
### Properties
| Name | Summary |
|---|---|
| [body](body.md) | `var body: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [isSuccessful](is-successful.md) | `val isSuccessful: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [resultCode](result-code.md) | `var resultCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
### Functions
| Name | Summary |
|---|---|
| [toJson](to-json.md) | `fun toJson(): JSONObject` |

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](index.md) / [isSuccessful](./is-successful.md)
# isSuccessful
`val isSuccessful: `[`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/CallResponse.kt#L41)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](index.md) / [resultCode](./result-code.md)
# resultCode
`var resultCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/CallResponse.kt#L40)

View file

@ -0,0 +1,5 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [CallResponse](index.md) / [toJson](./to-json.md)
# toJson
`fun toJson(): JSONObject` [(source)](https://github.com/ethauvin/bitly-shorten/tree/master/src/main/kotlin/net/thauvin/erik/bitly/CallResponse.kt#L44)

View file

@ -0,0 +1,11 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [FALSE](./-f-a-l-s-e.md)
# FALSE
`const val 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/Constants.kt#L63)
False
**Value**
`false`

View file

@ -0,0 +1,11 @@
[docs](../../index.md) / [net.thauvin.erik.bitly](../index.md) / [Constants](index.md) / [TRUE](./-t-r-u-e.md)
# TRUE
`const val TRUE: `[`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#L70)
True
**Value**
`true`