Queries

Youtube Teaser

The assignment

The task is to search programs from the Yle API

  • The application should have an input field where the user can provide what programs to search for (a search query).
  • The Finnish title of each result should be displayed in a scrollable list.
  • When submitting a search, only the first 10 results should be retrieved from the API.
  • When the user scrolls to the last few items in the list, the next 10 results should be appended to the list.
  • Pressing on the row should display more details about the program. For this you can select any 5 revelant fields from the JSON.

Technologies used

  • Unity UI
  • UnityWebRequest
  • A JSON library
Queries 1 Queries 2 Queries 3
Game of Thrones! Yay!.

Results

  • I find that the Unity Json Utility has some limitations (e.g. we can’t easily import an array of objects)
  • I found (and use here) a port Json.Net.Unity3D of the famous Newtonsoft Json.NET library
  • To build to iOS I have to tweak some things in XCode (more information in the Port github above)
  • Essentialy it’s a good practice to use Coroutines when doing webRequest so we have non-blocking requests
  • Visual Studio has awesome tools to “rebuild” a Json Structure into an OOP-ish object