<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| package com.experiments.preferencehelper | |
| import android.os.Bundle | |
| import android.support.v7.app.AppCompatActivity | |
| import android.util.Log | |
| import com.experiments.preferencehelper.PreferenceHelper.get | |
| import com.experiments.preferencehelper.PreferenceHelper.set | |
| class MainActivity : AppCompatActivity() { |
| ... | |
| apply from: './flavors.gradle' | |
| ... | |
| android { | |
| buildTypes { | |
| productFlavors { | |
| project.flavors.each { flavor, config -> | |
| "$flavor" { | |
| dimension 'scope' | |
| if (flavor != 'full') { |
| data class SimpleDemoState(val listing: Async<Listing> = Uninitialized) | |
| class SimpleDemoViewModel(override val initialState: SimpleDemoState) : MvRxViewModel<SimpleDemoState>() { | |
| init { | |
| fetchListing() | |
| } | |
| private fun fetchListing() { | |
| // This automatically fires off a request and maps its response to Async<Listing> | |
| // which is a sealed class and can be: Unitialized, Loading, Success, and Fail. |