In my application on android, you need to send get requests using retrofit, this request should have, I think so, certain parameters, I was thrown by the backenders:
HTTP 200 { "count": int, # number of messages "messages": [ # array of messages { "id": int, # message id "subject": str, # message subject "can_delete": int, # can it be deleted (1) or not (0) "new": int # message already read (0) or not (1) "date": str, # date of message in 'dmy'. If message was sent today format will be 'H:M' "receiver_name": str, # name of receiver if type=1 "sender_name": str, # name of sender if type=0 }, ... ], "next_url": URL, # url for get next messages, if no more messages value is null "previous_url": URL # url for get previous messages, if no more messages value is null } and here I have a question - in double brackets we have the parameters and then their units of measure are written, and I cannot understand how to build a query with the above parameters, and then how to initialize this interface. I have an interface for building all requests from the application:
Call<List<IncomeMessages>> getInMess(@Query("count") Integer method); if I understand correctly (as it was written in my sources) you need to use query in order to prescribe all variables. Here in a successful answer there is a certain ramification, for example, messages consists of separate qualifiers, and I need to create a new get request only for this field, or all variables, count, messages, next / previous url, can be placed within one request. What I still do not quite understand how I later distinguish the data after receiving them from the server. I would be very grateful for the help in solving this request, as I have been sitting all weekend.