Skip to content

Instantly share code, notes, and snippets.

Last active Jan 30, 2017
What would you like to do?
button.setOnClickListener(v -> getData(new DataSubscriber()));
public void getData(DataSubscriber subscriber) {
Subscription s = apiEndpoints.getData()
private class DataSubscriber extends Subscriber<Data> {
public void onCompleted() {
//we are done, yey!
public void onError(Throwable e) {
showError("oh no!");
public void onNext(Data data) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment