Hey, I'm new to using this API but I'm trying to get the value poster_sizes into my posterpath without having to hard code it in. I tried doing
for (int i = 0; i < 7; i++) {
posterSize[i] = jsonObject.getString("poster_sizes");
Log.i(TAG, i + "size: " + posterSize[i]);
}
and
posterSize = jsonObject.getString("poster_sizes");
but i keep getting a json exception: No value for poster_sizes.
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 š§š· pt-BR
on October 16, 2019 at 11:15 PM
Maybe here you will find what you need
https://developers.themoviedb.org/3/configuration/get-api-configuration
Or with this Request
https://api.themoviedb.org/3/configuration?api_key=[MY_KEY]
Reply by Anexis
on October 17, 2019 at 12:04 AM
I changed it to JSONArray images = jsonObject.getJSONArray("poster_sizes"); and then I assume I have to input the contents of that array into a string array? Either way, that line of code still gives me the same error. And i dont know why.