Currently, I am using Retrofit to get data from api. But the format of data has a bit different with other format such as :
["tayl",["taylor swift","taylor swift kanye west","taylor swift famous","taylor swift mp3","taylor lautner","taylor swift wiki","taylor swift 1989","taylor hill","taylor swift 2016","taylor kinney"]]
So, I want to ask for the best solution to parse values to get a list as below if I want to use retrofit
"taylor swift","taylor swift kanye west","taylor swift famous","taylor swift mp3","taylor lautner","taylor swift wiki","taylor swift 1989","taylor hill","taylor swift 2016","taylor kinney"
The content of file above is the data which GoogleAutoComplete Api return for me with the link below :
http://suggestqueries.google.com/complete/search?client=firefox&q=tayl
I implemented code as below but it is not good
@Headers({
"Accept: application/json",
"Content-Type: application/json; charset=UTF-8"
})
@GET("complete/search?")
Call<ResponseBody> getAutoComplete(@Query(@Query("q")String query);
But the responbody returned for me is null. Please help me in this case. Thanks.
Aucun commentaire:
Enregistrer un commentaire