0

In my Android application I have one EditText, one Button, and one RecyclerView, and Adapter. When I type a movie name into my EditText field or as I type on the , I want the RecyclerView to be populated with movie names from the Rotten Tomatoes website that match what I entered into the EditText field.

But I can't figure out how to use the Rotten Tomatoes JSON API to get the movie data Using TextWatcher. How do I do it? or is there any one with better ideas? I have struggled with this for days.. Kindly provide me with an example.

1 Answers1

0

Simple :)

http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=[your_api_key]&q=[your_escaped_query]&page_limit=1

Query against this JSON endpoint via whatever way you prefer. The textwatcher shall return a char, but I would suggest you pull the entire content of the field every time. Then you set a query against the string.

Example JSON string download: Downloading a website to a string

Community
  • 1
  • 1
Hupfauer
  • 591
  • 1
  • 4
  • 15