Skip to content

Commit

Permalink
Merge pull request #9 from Unlimity/remove_wrapper_class
Browse files Browse the repository at this point in the history
Migrate to new type inference
  • Loading branch information
Unlimity authored Jun 26, 2019
2 parents b58416f + 5f9f8a8 commit e2b6d3f
Show file tree
Hide file tree
Showing 79 changed files with 128 additions and 419 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

| Name | Summary |
|---|---|
| [requestConverter](request-converter.md) | `fun requestConverter(type: `[`Type`](http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonRequestBodyConverter`](../-gson-request-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>` |
| [responseConverter](response-converter.md) | `fun responseConverter(type: `[`Type`](http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonResponseBodyConverter`](../-gson-response-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>` |
| [requestConverter](request-converter.md) | `fun requestConverter(type: `[`Type`](https://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonRequestBodyConverter`](../-gson-request-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!>` |
| [responseConverter](response-converter.md) | `fun responseConverter(type: `[`Type`](https://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonResponseBodyConverter`](../-gson-response-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!>` |
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# requestConverter

`fun requestConverter(type: `[`Type`](http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonRequestBodyConverter`](../-gson-request-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>`
`fun requestConverter(type: `[`Type`](https://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonRequestBodyConverter`](../-gson-request-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# responseConverter

`fun responseConverter(type: `[`Type`](http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonResponseBodyConverter`](../-gson-response-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>`
`fun responseConverter(type: `[`Type`](https://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Type.html)`): `[`GsonResponseBodyConverter`](../-gson-response-body-converter/index.md)`<out `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# call

`inline fun <reified T> Api.call(crossinline receiver: Wrapper<`[`T`](call.md#T)`>.() -> `[`T`](call.md#T)`): `[`Call`](../-call/index.md)`<`[`T`](call.md#T)`>`
`inline fun <reified T> Api.call(crossinline receiver: Api.() -> `[`T`](call.md#T)`): `[`Call`](../-call/index.md)`<`[`T`](call.md#T)`>`

Wraps the network call with [Call](../-call/index.md). If no exceptions were thrown, the inferred return type will be
passed as the [result](../-call/-success/result.md) property of [Success](../-call/-success/index.md) wrapper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

| Name | Summary |
|---|---|
| [call](call.md) | `fun <T> Api.call(receiver: Wrapper<`[`T`](call.md#T)`>.() -> `[`T`](call.md#T)`): `[`Call`](../-call/index.md)`<`[`T`](call.md#T)`>`<br>Wraps the network call with [Call](../-call/index.md). If no exceptions were thrown, the inferred return type will be passed as the [result](../-call/-success/result.md) property of [Success](../-call/-success/index.md) wrapper. |
| [call](call.md) | `fun <T> Api.call(receiver: Api.() -> `[`T`](call.md#T)`): `[`Call`](../-call/index.md)`<`[`T`](call.md#T)`>`<br>Wraps the network call with [Call](../-call/index.md). If no exceptions were thrown, the inferred return type will be passed as the [result](../-call/-success/result.md) property of [Success](../-call/-success/index.md) wrapper. |
2 changes: 1 addition & 1 deletion docs/extension-call/package-list
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$dokka.format:gfm
$dokka.linkExtension:md
$dokka.location:com.agoda.ninjato.extension.call$call(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.call.call.T)), )))com.agoda.ninjato.extension.call/com.agoda.ninjato.-api/call.md
$dokka.location:com.agoda.ninjato.extension.call$call(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.call.call.T)))com.agoda.ninjato.extension.call/com.agoda.ninjato.-api/call.md
com.agoda.ninjato.extension.call
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# completable

`inline fun Api.completable(crossinline receiver: Wrapper<`[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`>.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`
`inline fun Api.completable(crossinline receiver: Api.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`

Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#)
will be invoked as soon as the call finishes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

| Name | Summary |
|---|---|
| [completable](completable.md) | `fun Api.completable(receiver: Wrapper<`[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`>.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`<br>Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#) will be invoked as soon as the call finishes. |
| [observable](observable.md) | `fun <T> Api.observable(receiver: Wrapper<`[`T`](observable.md#T)`>.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`<br>Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [single](single.md) | `fun <T> Api.single(receiver: Wrapper<`[`T`](single.md#T)`>.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`<br>Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [completable](completable.md) | `fun Api.completable(receiver: Api.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`<br>Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#) will be invoked as soon as the call finishes. |
| [observable](observable.md) | `fun <T> Api.observable(receiver: Api.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`<br>Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [single](single.md) | `fun <T> Api.single(receiver: Api.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`<br>Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# observable

`inline fun <reified T> Api.observable(crossinline receiver: Wrapper<`[`T`](observable.md#T)`>.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`
`inline fun <reified T> Api.observable(crossinline receiver: Api.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`

Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be
passed to the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# single

`inline fun <reified T> Api.single(crossinline receiver: Wrapper<`[`T`](single.md#T)`>.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`
`inline fun <reified T> Api.single(crossinline receiver: Api.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`

Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be
passed to the subscription.
Expand Down
6 changes: 3 additions & 3 deletions docs/extension-rxjava/package-list
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$dokka.format:gfm
$dokka.linkExtension:md
$dokka.location:com.agoda.ninjato.extension.rxjava$completable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((kotlin.Unit)), )))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/completable.md
$dokka.location:com.agoda.ninjato.extension.rxjava$observable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.rxjava.observable.T)), )))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/observable.md
$dokka.location:com.agoda.ninjato.extension.rxjava$single(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.rxjava.single.T)), )))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/single.md
$dokka.location:com.agoda.ninjato.extension.rxjava$completable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, kotlin.Unit)))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/completable.md
$dokka.location:com.agoda.ninjato.extension.rxjava$observable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.rxjava.observable.T)))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/observable.md
$dokka.location:com.agoda.ninjato.extension.rxjava$single(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.rxjava.single.T)))com.agoda.ninjato.extension.rxjava/com.agoda.ninjato.-api/single.md
com.agoda.ninjato.extension.rxjava
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# completable

`inline fun Api.completable(crossinline receiver: Wrapper<`[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`>.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`
`inline fun Api.completable(crossinline receiver: Api.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`

Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#)
will be invoked as soon as the call finishes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# flowable

`inline fun <reified T> Api.flowable(crossinline receiver: Wrapper<`[`T`](flowable.md#T)`>.() -> `[`T`](flowable.md#T)`): Flowable<`[`T`](flowable.md#T)`>`
`inline fun <reified T> Api.flowable(crossinline receiver: Api.() -> `[`T`](flowable.md#T)`): Flowable<`[`T`](flowable.md#T)`>`

Wraps the network call with [Flowable](#). If no exceptions were thrown, the inferred return type will be
passed to the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Summary |
|---|---|
| [completable](completable.md) | `fun Api.completable(receiver: Wrapper<`[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`>.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`<br>Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#) will be invoked as soon as the call finishes. |
| [flowable](flowable.md) | `fun <T> Api.flowable(receiver: Wrapper<`[`T`](flowable.md#T)`>.() -> `[`T`](flowable.md#T)`): Flowable<`[`T`](flowable.md#T)`>`<br>Wraps the network call with [Flowable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [observable](observable.md) | `fun <T> Api.observable(receiver: Wrapper<`[`T`](observable.md#T)`>.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`<br>Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [single](single.md) | `fun <T> Api.single(receiver: Wrapper<`[`T`](single.md#T)`>.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`<br>Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [completable](completable.md) | `fun Api.completable(receiver: Api.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): Completable`<br>Wraps the network call with [Completable](#). If no exceptions were thrown, [complete()](#) will be invoked as soon as the call finishes. |
| [flowable](flowable.md) | `fun <T> Api.flowable(receiver: Api.() -> `[`T`](flowable.md#T)`): Flowable<`[`T`](flowable.md#T)`>`<br>Wraps the network call with [Flowable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [observable](observable.md) | `fun <T> Api.observable(receiver: Api.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`<br>Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
| [single](single.md) | `fun <T> Api.single(receiver: Api.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`<br>Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be passed to the subscription. |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# observable

`inline fun <reified T> Api.observable(crossinline receiver: Wrapper<`[`T`](observable.md#T)`>.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`
`inline fun <reified T> Api.observable(crossinline receiver: Api.() -> `[`T`](observable.md#T)`): Observable<`[`T`](observable.md#T)`>`

Wraps the network call with [Observable](#). If no exceptions were thrown, the inferred return type will be
passed to the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# single

`inline fun <reified T> Api.single(crossinline receiver: Wrapper<`[`T`](single.md#T)`>.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`
`inline fun <reified T> Api.single(crossinline receiver: Api.() -> `[`T`](single.md#T)`): Single<`[`T`](single.md#T)`>`

Wraps the network call with [Single](#). If no exceptions were thrown, the inferred return type will be
passed to the subscription.
Expand Down
8 changes: 4 additions & 4 deletions docs/extension-rxjava2/package-list
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$dokka.format:gfm
$dokka.linkExtension:md
$dokka.location:com.agoda.ninjato.extension.rxjava2$completable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((kotlin.Unit)), )))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/completable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$flowable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.rxjava2.flowable.T)), )))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/flowable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$observable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.rxjava2.observable.T)), )))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/observable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$single(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.extension.Wrapper((com.agoda.ninjato.extension.rxjava2.single.T)), )))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/single.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$completable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, kotlin.Unit)))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/completable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$flowable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.rxjava2.flowable.T)))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/flowable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$observable(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.rxjava2.observable.T)))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/observable.md
$dokka.location:com.agoda.ninjato.extension.rxjava2$single(com.agoda.ninjato.Api, kotlin.Function1((com.agoda.ninjato.Api, com.agoda.ninjato.extension.rxjava2.single.T)))com.agoda.ninjato.extension.rxjava2/com.agoda.ninjato.-api/single.md
com.agoda.ninjato.extension.rxjava2
Loading

0 comments on commit e2b6d3f

Please sign in to comment.