Skip to content

Instantly share code, notes, and snippets.

@rallat
Created December 15, 2015 17:07
Show Gist options
  • Save rallat/b90b1c11def8f728eb6f to your computer and use it in GitHub Desktop.
Save rallat/b90b1c11def8f728eb6f to your computer and use it in GitHub Desktop.
Extend TwitterApiClient for fun an profit
// extend from TwitterApiClient to use the auth
public class DmApiClient extends TwitterApiClient{
public DmApiClient(TwitterSession session) {
super(session);
}
public TimelineService getTimeLineService(){
return this.getService(TimelineService.class);
}
}
// new entrypoint you want to add
public interface TimelineService {
@GET("/1.1/statuses/home_timeline.json")
void homeTimeline(@Query("count") Integer var1, @Query("trim_user") Boolean var4, @Query
("exclude_replies") Boolean var5, @Query("contributor_details") Boolean var6,
@Query("include_entities") Boolean var7, Callback<List<Tweet>> var8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment