Skip to content

Instantly share code, notes, and snippets.

@bearprada
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bearprada/fe4a8b457bf0e68d745b to your computer and use it in GitHub Desktop.
Save bearprada/fe4a8b457bf0e68d745b to your computer and use it in GitHub Desktop.
...
protected onCreate(Bundle savedStateInstance) {
RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint("https://example.com")
.build();
SampleService service = restAdapter.create(SampleService.class);
List<Repo> repos = service.listRepos("PRADA", 10);
}
...
public interface SampleService
@GET("/users/{user}/repos")
List<Repo> listRepos(@Path("user") String user, @Query("limit") int limit);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment