Skip to content

Commit

Permalink
Merge pull request #136 from vimeo/api-3032
Browse files Browse the repository at this point in the history
Specify tuspy version explicitly.
  • Loading branch information
erunion committed Sep 7, 2018
2 parents 812c4bc + 8d20782 commit 32f3ee4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions example/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Create a variable with a hard coded path to your file system
file_name = '<full path to a video on the filesystem>'

print 'Uploading: %s' % file_name
print('Uploading: %s' % file_name)

try:
# Upload the file and include the video title and description.
Expand All @@ -33,7 +33,7 @@

# Get the metadata response from the upload and log out the Vimeo.com url
video_data = client.get(uri + '?fields=link').json()
print '"%s" has been uploaded to %s' % (file_name, video_data['link'])
print('"%s" has been uploaded to %s' % (file_name, video_data['link']))

# Make an API call to edit the title and description of the video.
client.patch(uri, data={
Expand All @@ -42,16 +42,16 @@
"Python SDK."
})

print 'The title and description for %s has been edited.' % uri
print('The title and description for %s has been edited.' % uri)

# Make an API call to see if the video is finished transcoding.
video_data = client.get(uri + '?fields=transcode.status').json()
print 'The transcode status for %s is: %s' % (
print('The transcode status for %s is: %s' % (
uri,
video_data['transcode']['status']
)
))
except vimeo.exceptions.VideoUploadFailure as e:
# We may have had an error. We can't resolve it here necessarily, so
# report it to the user.
print 'Error uploading %s' % file_name
print 'Server reported: %s' % e.message
print('Error uploading %s' % file_name)
print('Server reported: %s' % e.message)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
author_email='[email protected]',
license='Apache License, Version 2.0, January 2004',
packages=['vimeo', 'vimeo/auth'],
install_requires=['requests>=2.4.0', 'tuspy>=0.2.1'],
install_requires=['requests>=2.4.0', 'tuspy==0.2.1'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
Expand Down

0 comments on commit 32f3ee4

Please sign in to comment.