Skip to content

Instantly share code, notes, and snippets.

@mustafaguven
Created May 5, 2020 10:40
Show Gist options
  • Save mustafaguven/37ccdd0f81e931df56b486f2168c42d6 to your computer and use it in GitHub Desktop.
Save mustafaguven/37ccdd0f81e931df56b486f2168c42d6 to your computer and use it in GitHub Desktop.
Localhost:8081/sync/?date=202005031000
{
“message”: null,
“status”: “1”,
“data”: {
“products” : [
ilk 10unu donuyosun
],
“pages”: 1,
“currentPage”: 1
}
}
Localhost:8081/sync/?date=202005031000&page=2
{
“message”: null,
“status”: “1”,
“data”: {
productsResponse : {
“products” : [
ilk 10unu donuyosun
],
“pages”: 5,
“currentPage”: 2
}
}
}
class <T> BaseResponse {
String message
int status
T data
}
class ProductResponse {
List<Product> products;
int pages;
int currentPage;
}
class GetProductResponse extends BaseResponse<ProductResponse> {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment