All Versions
5
Latest Version
Avg Release Cycle
33 days
Latest Release
1982 days ago

Changelog History

  • v0.5.0 Changes

    November 16, 2018

    ๐Ÿš€ Released on 2018-11-16.

    • โฌ†๏ธ Upgrade kotlin version to 1.3 and coroutines version to 1.0.1.
    • โฌ†๏ธ Upgrade Android target version to 28
  • v0.4.0 Changes

    October 23, 2018

    ๐Ÿš€ Released on 2018-10-23. Big Breaking changes:

    Fountain modules

    The library now has 3 different modules:

    • Coroutine module: Uses a Coroutine Retrofit adapter to fetch the pages.
    • Retrofit module: Uses a simple Retrofit call to fetch the pages.
    • RxJava2 module: Uses a RxJava2 Retrofit adapter to fetch the pages.

    These modules are independent and none of them are strictly required. The new dependencies are:

    repositories {
        maven { url "https://jitpack.io" }
    }
    
    dependencies {
        // This dependency is required only if you want to use a Retrofit service without a special adapter. 
        implementation 'com.github.xmartlabs.fountain:fountain-retrofit:0.4.0'
    
        // This dependency is required only if you want to use a Coroutine retrofit adapter.
        implementation 'com.github.xmartlabs.fountain:fountain-coroutines:0.4.0'
    
        // This dependency is required only if you want to use a RxJava2 retrofit adapter.
        implementation 'com.github.xmartlabs.fountain:fountain-rx2:0.4.0'
    }
    

    ๐Ÿ‘ Not paged endpoint support

    ๐Ÿ‘ Although Fountain was designed to work with paged endpoints, it also supports working with not paged endpoints. That means that you can use all [Listing] features in services that return a list that's not paged.

    Factory constructors

    There's one static factory object class for each each dependency.

    • FountainCoroutines: Used to get a [Listing] from a Retrofit service which uses a Coroutine adapter.
    • FountainRetrofit: Used to get a [Listing] from a Retrofit service without using a special adapter.
    • FountainRx: Used to get a [Listing] from a Retrofit service which uses a RxJava2 adapter.

    Each static factory has the same constructors with different params:

    • createNetworkListing: A constructor to get a Listing component from a common paged Retrofit service implementation.
    • createNotPagedNetworkListing: A constructor to get a Listing component from a common not paged Retrofit service implementation.
    • ๐Ÿ‘ createNetworkWithCacheSupportListing: A constructor to get a Listing component with cache support from a common paged Retrofit service implementation.
    • ๐Ÿ‘ createNotPagedNetworkWithCacheSupportListing: A constructor to get a Listing component with cache support from a common not paged Retrofit service implementation.

    NetworkDataSourceAdapter creators

    If you use either ListResponseWithPageCount or ListResponseWithEntityCount you can convert a PageFetcher to a NetworkDataSourceAdapter using these extensions:

    fun <ServiceResponse : ListResponseWithEntityCount<*>>
        PageFetcher<ServiceResponse>.toTotalEntityCountNetworkDataSourceAdapter(firstPage: Int)
    fun <ServiceResponse : ListResponseWithPageCount<*>>
        PageFetcher<ServiceResponse>.toTotalPageCountNetworkDataSourceAdapter(firstPage: Int)
    

    ๐Ÿ“š To more about these changes you can read the full documentation here.

  • v0.3.0 Changes

    September 12, 2018

    ๐Ÿš€ Released on 2018-09-12.

    • ๐Ÿ‘Œ Improve NetworkState structure #28. Now that structure has the requested page number, pageSize, isFirstPage, isLastPage.

    ๐Ÿ’ฅ Breaking changes: ๐Ÿšš The NetworkState data class is replaced by a sealed class and the Status enum was removed.

  • v0.2.0 Changes

    July 25, 2018

    ๐Ÿ’ฅ Breaking changes:

    • โž• Added the possibility of using different models on Network and DataSource sources.
      ๐Ÿ‘ Fountain.createNetworkWithCacheSupportListing now requires two type declarations #28.

    ๐Ÿ›  Fixes:

    • ๐Ÿ›  Fix issue when the initialization process throws an Exception #29.
  • v0.1.0 Changes

    July 09, 2018

    ๐Ÿš€ Released on 2018-07-05. This is the initial version.