Build media from JSON
Move single media related code to Media class
Switch to using Media class in API
Delegate client calls to the API class
Fix building requests with query parameters