I have a django app in which i am using PyVimeo
module to connect and upload videos etc., to Vimeo
The actual vimeo api to post the region data was here
For example i have the following data [{u'country_name': u'CA'}, {u'country_name': u'US'}]
to send a PUT
request to the url https://api.vimeo.com/ondemand/pages/47753/regions
From code i was trying to send PUT request as below
import vimeo
token = XXXXXXXXXXXXXXXXXX
VIMEO_KEY = XXXXXXXXXXXXXXXXXX
VIMEO_SECRET = XXXXXXXXXXXXXXXXXX
client = vimeo.VimeoClient(key=VIMEO_KEY, secret=VIMEO_SECRET, token=token)
url = https://api.vimeo.com/ondemand/pages/47753/regions
regions_data = [{u'country_name': u'CA'}, {u'country_name': u'US'}]
result_data = client.put(url, regions_data)
Response was 400 Bad request
When tried in the below way as indicated in the Vimeo API docs
client.put(url + 'CA')
Response
HTTP/1.1 201
Location: Array
Host: api.vimeo.com
But it was not reflecting in the Distribution section of the video setting and being as Worldwide
by default
So how actually to set a list of regions to a on demand page VOD ?