Last active
December 2, 2018 19:25
-
-
Save naturalwarren/866ac99c5bcfcf421ba31ff5651ad66a to your computer and use it in GitHub Desktop.
Demonstrates
This file contains hidden or 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
val authApi: OAuthApi = Retrofit.newBuilder() | |
.baseUrl(COINBASE_URL) | |
.addConverterFactory(MoshiConverterFactory.create(moshi)) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(Schedulers.io())) | |
.build() | |
.create() | |
interface OAuthApi { | |
/** | |
* Calls onError() in the event that a network error | |
* (request didn't make it to the server or response didn't make | |
* it back to the client) occurs. | |
*/ | |
@POST("token") | |
fun authToken(@Body body: TokenRequestBody): Single<Response<AccessToken>> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment