Skip to content

Instantly share code, notes, and snippets.

@DDRBoxman
Last active April 29, 2016 00:47
Show Gist options
  • Save DDRBoxman/f688508854a53651d799992a11a47bb6 to your computer and use it in GitHub Desktop.
Save DDRBoxman/f688508854a53651d799992a11a47bb6 to your computer and use it in GitHub Desktop.
public class GameWispResponse<T> {
List<T> data;
Result result;
}
public class Result {
int status;
String message;
}
public class Meta {
Cursor cursor;
}
public class Cursor {
String next;
int count;
}
public class GameWispSub {
int id;
int userId;
String status;
}
public interface GameWispService {
@GET("URLHERE")
Call<GameWispResponse<GameWispSub>> getGameWispSubs();
}
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://'https://api.gamewisp.com/pub/v1/")
.build();
GameWispService service = retrofit.create(GameWispService.class);
Call<GameWispResponse<GameWispSub>> subs = service.getGameWispSubs();
system.out.println(subs.data.get(0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment