julian / python-vimeo Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dkm/python-vimeo
Access the Vimeo Advanced API (v2) in Python
License: MIT License
This project forked from dkm/python-vimeo
Access the Vimeo Advanced API (v2) in Python
License: MIT License
These are a collection of python modules for using Vimeo's APIs. DEPENDENCIES ------------ This module depends on oauth2 and httplib2 (which is a dependency of oauth2 itself). INSTALL ------- Just unpack and run: $ python setup.py install STATUS ------ As far as I know, everything in the Advanced API should work. You'll need to provide your API key and secret. If you happen to be using this from within a django project, this module will check settings.py for an API key and secret to use by default. Otherwise, initialize the VimeoClient with your key and secret. If you find anything that doesn't work as expected, please let me know! The Uploading and oEmbed APIs are also now supported. Uploading makes use of a very elementary chunking procedure and an optional callback that you can use (to for example do background uploading, build a progress bar, etc.). Again, if you encounter any API methods with unexpected behavior that you think is due to one of these modules, please let me know (preferably by filing a ticket). USAGE ----- Advanced API methods flow through the VimeoClient class. Instantiate, then if you want to call API methods that require authentication, call the provided get_request_token, get_authorization_url and get_access_token methods to do the 3-legged authentication. Or if you already have an access token pass it in to the VimeoClient constructor. (If you happen to be using this module with django or another web framework like I am, the oauth2 docs have a quick example [using twitter which has the same authorization process just about] that you can take a look at for 3-legged authorization). For unauthenticated API calls, you're good to go right after instantiating. To call API methods the syntax is easy: find the path to the method in the API documentation, and call the method on the VimeoClient instance using the full path, separated by underscores (not periods!). Pass any parameters in by keyword. See the example: To call the vimeo >> videos >> getInfo method: v = VimeoClient() v.vimeo_videos_getInfo(video_id="5775787") You can control the output format of the response by either passing in a format argument when initializing or by using the .default_response_property attr. JSON might be the most convenient format to use as it'll get you a python dict back, but XML might be a bit faster. In general, consult the Vimeo API docs, as the behavior of this binding should by design follow the API docs closely. If you happen to be stuck, you can get in contact with me by filing a ticket on the git repository. CONTRIBUTORS (From the Original README) ------------ This module was a (third) complete rewrite from an old vimeo module. Bengt Sjölén Marc Poulhiès (original module author) Julian Berman (current rewrite) LICENSE ------- For license details please see the LICENSE.txt file included with this document.
Base class
When trying to get a new access token with more permissions.
Might have to find a way to store what kind of token is present.
Probably not on method return, takes too much time.
Maybe just provide a get_doc function on VimeoClient objects.
Or if we're feeling evil make __doc__
into a descriptor.
_no_cache list?
Also check for other methods that take no / few parameters and would likely be called in succession with different desired returns.
If the object already has an oauth_token_key
and oauth_token_secret
, get_access_token
may be being called in order to get a higher permission token.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.