Instantly share code, notes, and snippets.

What would you like to do?
import static rx.Observable.error;
import static rx.Observable.fromCallable;
import static rx.Observable.just;
import static;
import com.groupon.grox.Action;
import com.groupon.grox.commands.rxjava1.Command;
import rx.Observable;
public class LoginCommand implements Command {
private LoginApiClient loginApiClient;
private String username;
private String password;
public LoginCommand(CharSequence username, CharSequence password, LoginApiClient loginApiClient){
this.username = username;
this.password = password;
this.loginApiClient = loginApiClient;
public Observable<? extends Action> actions() {
return just(LogInProgressAction).concatWith(performLoginRequest());
public Observable<? extends Action> performLoginRequest(){
return loginApiClient.performLogin(username, password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment