All Projects → MohammadSianaki → Retrofit2-Flow-Call-Adapter

MohammadSianaki / Retrofit2-Flow-Call-Adapter

Licence: other
A Retrofit 2 adapter for Kotlin Flows.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Retrofit2-Flow-Call-Adapter

Stars
An android application build with a clean architecture approach and Star wars API
Stars: ✭ 54 (+31.71%)
Mutual labels:  coroutines, retrofit2, coroutines-android
NewsReader
Android News Reader app. Kotlin Coroutines, Retrofit and Realm
Stars: ✭ 21 (-48.78%)
Mutual labels:  coroutines, retrofit2, kotlin-coroutines
GitKtDroid
A sample Android application📱 built with Kotlin for #30DaysOfKotlin
Stars: ✭ 53 (+29.27%)
Mutual labels:  coroutines, retrofit2, coroutines-android
BlueFlow
Android Bluetooth classic API wrapped in Coroutines Flow.
Stars: ✭ 64 (+56.1%)
Mutual labels:  coroutines, kotlin-coroutines, coroutines-android
kotlin-coroutines-android
Kotlin Coroutines for Android
Stars: ✭ 14 (-65.85%)
Mutual labels:  retrofit2, kotlin-coroutines, coroutines-android
Modular App Core
Core implementations for a modular Android App
Stars: ✭ 127 (+209.76%)
Mutual labels:  coroutines, retrofit2, kotlin-coroutines
Kotlin Coroutines Retrofit
Kotlin Coroutines await() extension for Retrofit Call
Stars: ✭ 812 (+1880.49%)
Mutual labels:  coroutines, retrofit2, kotlin-coroutines
Foodium
It simply loads Posts data from API and stores it in persistence storage (i.e. SQLite Database). Posts will be always loaded from local database. Remote data (from API) and Local data is always synchronized.
Stars: ✭ 1,940 (+4631.71%)
Mutual labels:  coroutines, retrofit2, coroutines-android
Jetpack Compose News
基于Jetpack Compose实现的一款集新闻、视频、美图、音乐、天气等功能的资讯App,持续完善中...
Stars: ✭ 58 (+41.46%)
Mutual labels:  retrofit2, coroutines-android
Superhero-App
🦸🏻‍♂️🦹🏻‍♀️Superhero app built with Kotlin, ViewModel, LiveData, ViewBinding, Room, and Hilt
Stars: ✭ 27 (-34.15%)
Mutual labels:  coroutines, retrofit2
TheMovieDB
TheMovieDB is an android app based on TMDB api.
Stars: ✭ 16 (-60.98%)
Mutual labels:  retrofit2, kotlin-coroutines
MVI-Clean-Architecture
MVI + Clean Architecture + Best Practices | Example of Clean Architecture of Android app using MVI design pattern with Jetpack and popular libraries
Stars: ✭ 50 (+21.95%)
Mutual labels:  coroutines, coroutines-android
android-clean-arc-coroutines
Clean Architecture(Coroutines,Dagger, MVVM, ROOM, retrofit, databinding)
Stars: ✭ 116 (+182.93%)
Mutual labels:  coroutines, kotlin-coroutines
AndroidCoroutineScopes
This lib implements the most common CoroutineScopes used in Android apps.
Stars: ✭ 14 (-65.85%)
Mutual labels:  coroutines, kotlin-coroutines
TDDWeatherApp
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Stars: ✭ 38 (-7.32%)
Mutual labels:  retrofit2, kotlin-coroutines
SketchwareManager
Coroutine-based library for managing Sketchware (Sketchware Pro/Studio) projects, collections and etc.
Stars: ✭ 54 (+31.71%)
Mutual labels:  coroutines, kotlin-coroutines
Paging-3-Sample
This app is created as a sample app which loads movies from Tmdb api and uses Paging 3 library to show it in a Recycler view.
Stars: ✭ 96 (+134.15%)
Mutual labels:  coroutines, retrofit2
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+202.44%)
Mutual labels:  coroutines, kotlin-coroutines
DirectCurrencyConverter
Currency Converter App for Android showing usage of Flow, Live Data, Coroutines, Hilt - (Clean Architecture)
Stars: ✭ 40 (-2.44%)
Mutual labels:  coroutines, retrofit2
NYTimesMostPopularArticles
A simple app to hit the NY Times Most Popular Articles API and show a list of articles, that shows details when items on the list are tapped (a typical master/detail app), also user able to browse/ add articles to favorite list that implements MVVM architecture using Dagger2, Retrofit, Coroutines, LiveData, RoomDatabase, Database Debugging, Data…
Stars: ✭ 38 (-7.32%)
Mutual labels:  coroutines, retrofit2

Retrofit2-Flow-Call-Adapter

A Retrofit 2 CallAdapter.Factory for Kotlin Flows

Usage

Add FlowCallAdapterFactory as a CallAdapter when building your retrofit instance:

     val retrofit = Retrofit.Builder()
    .baseUrl("https://example.com/")
    .addCallAdapterFactory(FlowCallAdapterFactory.create())
    .build()

Your service methods can now use Flow as their return type.

interface WebService {
  @GET("/user")
  fun getUser(): Flow<UserDto>

  // or

  @GET("/user")
  fun getUser(): Flow<Response<UserDto>>
}

Downlaod

Step 1. Add the JitPack repository to your build file:

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

Step 2. Add the dependency:

dependencies {
    implementation 'com.github.MohammadSianaki:Retrofit2-Flow-Call-Adapter:latest-version'
}

Licence

Copyright 2019 Mohammad Sianaki.

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].