generated from y9vad9/kotlin-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: removal of grpc-engine notes, adding `RSocketTimeMatesRequestsE…
…ngine`
- Loading branch information
Showing
1 changed file
with
4 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,9 @@ platform and integrate its features into your own applications. | |
To demonstrate the usage of the SDK, consider the following example: | ||
|
||
```kotlin | ||
val engineBuilder = DefaultGrpcEngineBuilder() | ||
val engine = GrpcTimeMatesRequestsEngine(engineBuilder) | ||
val engine = RSocketTimeMatesRequestsEngine( | ||
coroutineScope = Dispatchers.IO, | ||
) | ||
val emailAuth = AccountLoginApi(engineBuilder).email | ||
val email = EmailAddress.create("[email protected]").getOrElse { return } | ||
|
||
|
@@ -24,12 +25,6 @@ val authorizationResult = emailAuth.authorize(email) | |
// until we complete our registration | ||
.map { (isNewAccount, authorization) -> ... } | ||
``` | ||
> **Note** <br> | ||
> For android use [AndroidGrpcEngineBuilder](/grpc-engine/android/src/main/kotlin/io/timemates/android/grpc/AndroidGrpcEngineBuilder.kt) | ||
>```kotlin | ||
> val engineBuilder = AndroidGrpcEngineBuilder(applicationContext) | ||
>``` | ||
In the provided code snippet, the SDK utilizes the Kotlin Result API extensively. | ||
|
||
It's important to note that the SDK's value objects, such as `EmailAddress` | ||
|
@@ -77,9 +72,7 @@ repositories { | |
|
||
dependencies { | ||
implementation("io.timemates:sdk:$version") | ||
implementation("io.timemates:grpc-engine:$version") | ||
// for android | ||
implementation("io.timemates:grpc-engine-android:$version") | ||
implementation("io.timemates:rsocket-engine:$version") | ||
} | ||
``` | ||
|
||
|