Home

Awesome

NetworkResponse Retrofit adapter

Build Status

This library provides a Kotlin Coroutines based Retrofit call adapter for wrapping your API responses in a NetworkResponse sealed type.

Documentation

https://haroldadmin.github.io/NetworkResponseAdapter

Network Response

NetworkResponse<S, E> is a Kotlin sealed interface with the following states:

It is generic on two types: a success response (S), and an error response (E).

Find complete documentation at https://haroldadmin.github.io/NetworkResponseAdapter.

Installation

Add the Jitpack repository to your list of repositories:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

And then add the dependency in your gradle file:

dependencies {
    implementation "com.github.haroldadmin:NetworkResponseAdapter:(latest-version)"
}

Release

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.