Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public interface GithubService {
  2. @GET("/repos/{owner}/{repo}/contributors")
  3. public List<Contributor> contributors(@Path("owner") String owner, @Path("repo") String repo);
  4. }
  5.  
  6. RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint("https://api.github.com").build();
  7. GithubService service = restAdapter.create(GithubService.class);
  8. listContributors = service.contributors(username, "retrofit");
  9. Log.d("List Contributors", listContributors+" ");
  10.  
  11. public class Contributor {
  12. String login;
  13. int contributions;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement