Use StreamingIterator to avoid loading the whole movie file.
[audio.git] / src / apiclient / __init__.py
index e489807..264f030 100644 (file)
@@ -32,3 +32,8 @@ def api_call(user, path, method='POST', data=None, files=None):
     else:
         raise ApiError("WL API call error %s, path: %s" % (r.status_code, path))
 
+
+def youtube_call(method, url, params=None, json=None, data=None, resumable_file_path=None):
+    from .models import YouTubeToken
+    yt = YouTubeToken.objects.first()
+    return yt.call(method, url, params=params, json=json, data=data, resumable_file_path=resumable_file_path)