The first step uses a static array set in $channels, and each call to the API will only give 1 response at a time. (as I understand) So for the first step I have to figure out who in the list is live, with the most viewers. (I thought)
Could I ask API for all of them at once with multiple ?channel= requests?
The second step uses what you set and only takes the first streamer on /streams/