i tried this :
interface MYAPI {
@GET("get-languages")
fun getdata() : Call<List<Data.Language>>
}
this is my api service
{
"message": "success",
"data": {
"language": [ {"id": 5,
"name": "English",
"icon": "19638193-en.png"
},
{
"id": 6,"name": "turkish","icon": "19638199-tr.png"}
]
}
}
2
Answers
Solved..
i add to AndroidManifest :
Share your response model but you will need the "data" attribute that is a language model. If you use directly the language model then won´t works.
So a possible data could be:
And your call: