How to make this query which I will mention below?
Method @GET
. Query should looks like this:
/top40?data={"ranking":"world"}
/top40?data={"ranking":"country"}
@GET("/api/top40")
Call<FamousTop40Model> getStatus(
// what should be there?
);
class Factory {
private static FamousTop40Api service;
public static FamousTop40Api getInstance() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(ApiConstants.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
service = retrofit.create(FamousTop40Api.class);
return service;
}
}
Can you guys help me?
EDIT: + I should have accessKey
in the header.