package com.chaos.databinding.presenters;

import com.chaos.databinding.models.User;
import com.chaos.databinding.views.UserView;

public class ActivityMainPresenter {
    private final UserView view;

    public ActivityMainPresenter(final UserView view) {
        this.view = view;
    }

    public static ActivityMainPresenter create(final UserView view) {
        return new ActivityMainPresenter(view);
    }

    public void updateUser() {
        this.view.setUser(this.getUser());
    }

    private User getUser() {
        return new User("Ash Davies", "Berlin");
    }
}

@@ -111,300 +111,802 @@
 ing.
-views.UserView;%0A%0Apublic class ActivityMainPresenter %7B%0A    private final UserView view;%0A%0A    public ActivityMainPresenter(final UserView view) %7B%0A        this.view = view;%0A    %7D%0A%0A    public static ActivityMainPresenter create(final UserView view) %7B%0A        return new ActivityMainPresenter(view
+services.GitHub;%0Aimport com.chaos.databinding.views.UserView;%0A%0Aimport retrofit.RestAdapter;%0A%0Apublic class ActivityMainPresenter %7B%0A    private static final String GITHUB_API = %22https://api.github.com%22;%0A%0A    private final GitHub service;%0A    private final UserView view;%0A%0A    public ActivityMainPresenter(final GitHub service, final UserView view) %7B%0A        this.service = service;%0A        this.view = view;%0A    %7D%0A%0A    public static ActivityMainPresenter create(final UserView view) %7B%0A        final GitHub service = ActivityMainPresenter.getRestAdapter().create(GitHub.class);%0A        return new ActivityMainPresenter(service, view);%0A    %7D%0A%0A    private static RestAdapter getRestAdapter() %7B%0A        return new RestAdapter.Builder()%0A                .setEndpoint(GITHUB_API)%0A                .build(
 );%0A 

Create presenter with GitHub service