use of retrofit.RestAdapter 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);
RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint("https://api.stackexchange.com").build();
StackOverflowInterface so = restAdapter.create(StackOverflowInterface.class);
so.questions("android", this);
return (result);
}
use of retrofit.RestAdapter in project enroscar by stanfy.
the class RetrofitClientTest method shouldWorkForHttpScheme.
// http
@Test
public void shouldWorkForHttpScheme() throws Exception {
MockWebServer server = new MockWebServer();
server.play();
server.enqueue(new MockResponse().setResponseCode(200).setBody(mockResponse));
RestAdapter adapter = getRestAdapter(server.getUrl("/").toString());
fetchAndTest(adapter);
server.shutdown();
}
use of retrofit.RestAdapter in project wh-app-android by WhiteHouse.
the class SearchManager method search.
public Observable<SearchResults> search(String query) {
SearchService ss;
RestAdapter ra = getRestAdapter();
if (BuildConfig.DEBUG) {
ra.setLogLevel(RestAdapter.LogLevel.FULL);
}
ss = ra.create(SearchService.class);
return ss.search(query);
}
use of retrofit.RestAdapter 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);
RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint("https://api.stackexchange.com").build();
StackOverflowInterface so = restAdapter.create(StackOverflowInterface.class);
so.questions("android", this);
return (result);
}
use of retrofit.RestAdapter 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);
RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint("https://api.stackexchange.com").build();
StackOverflowInterface so = restAdapter.create(StackOverflowInterface.class);
String search = getArguments().getString(ARG_SEARCH);
if (search == null) {
so.questions("android", this);
} else {
so.search(search, this);
}
return (result);
}
Aggregations