Skip to content

Sajadrahimi/arvan-vod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arvan-vod

A Python SDK for ArvanCloud's VOD API

  from arvan_client.vod.vod import VOD
  
  vod = VOD('MY API KEY')
  channels = vod.get_channels()
  channel = next(filter(lambda t: t.description == 'my channels', channels))
  video = vod.get_videos(channel, "video name, a key word, etc")

To add video from url:

  vod.add_video(channel, "video title", video_url = "URL TO VIDEO")

To add video from file:

  uploaded_file_id = vod.request_upload(channel, "PATH TO FILE")
  vod.add_video(channel, "video title", file_id=uploaded_file_id)