Back to project page droidcon.
The source code is released under:
Apache License
If you think the Android project droidcon listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.timehop.droidcon2014retrofitsample.data.foursquare; /*from w w w . j a v a 2 s .c o m*/ import com.timehop.droidcon2014retrofitsample.data.foursquare.api.FoursquareErrorHandler; import com.timehop.droidcon2014retrofitsample.data.foursquare.api.FoursquareException; import com.timehop.droidcon2014retrofitsample.data.foursquare.api.FoursquareRequestInterceptor; import com.timehop.droidcon2014retrofitsample.data.foursquare.api.FoursquareResponse; import retrofit.Callback; import retrofit.RestAdapter; import retrofit.http.GET; import retrofit.http.Query; public interface FoursquareService { @GET("/venues/search") FoursquareResponse searchVenues(@Query("near") String location) throws FoursquareException; @GET("/venues/search") void searchVenues( @Query("near") String location, Callback<FoursquareResponse> callback); public static class Implementation { public static FoursquareService get() { return getBuilder() .build() .create(FoursquareService.class); } static RestAdapter.Builder getBuilder() { return new RestAdapter.Builder() .setEndpoint("https://api.foursquare.com/v2") .setRequestInterceptor(new FoursquareRequestInterceptor()) .setErrorHandler(new FoursquareErrorHandler()); } } }