use of retrofit2.Retrofit in project retrofit by square.
the class ListenableFutureTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(GuavaCallAdapterFactory.create()).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class CompletableFutureTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(Java8CallAdapterFactory.create()).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class FlowableWithSchedulerTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(scheduler)).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class MaybeTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.create()).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project cw-omnibus by commonsguy.
the class QuestionsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View result = super.onCreateView(inflater, container, savedInstanceState);
setRetainInstance(true);
Retrofit retrofit = new Retrofit.Builder().baseUrl("https://api.stackexchange.com").addConverterFactory(GsonConverterFactory.create()).build();
StackOverflowInterface so = retrofit.create(StackOverflowInterface.class);
so.questions("android").enqueue(this);
return (result);
}
Aggregations