nucleus.example.network.ItemsLoader Maven / Gradle / Ivy
package nucleus.example.network;
import retrofit.Callback;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class ItemsLoader extends RetrofitLoader {
private String name;
@Inject
public ItemsLoader() {
}
public void request(String name) {
this.name = name;
request();
}
@Override
protected void doRequest(Callback callback) {
api.getItems(name.split("\\s+")[0], name.split("\\s+")[1], callback);
}
}