MythTV  master
Public Member Functions | Public Attributes | Private Member Functions | List of all members
nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient Class Reference
Inheritance diagram for nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient:
Inheritance graph
[legend]
Collaboration diagram for nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, key, secret, server="vimeo.com", port=PORT, request_token_url=REQUEST_TOKEN_URL, access_token_url=ACCESS_TOKEN_URL, authorization_url=AUTHORIZATION_URL, token=None, token_secret=None)
 
def get_request_token (self)
 
def get_authorize_token_url (self)
 
def get_access_token (self, verifier)
 
def vimeo_oauth_checkAccessToken (self, auth_token)
 
def vimeo_albums_getAll (self, user_id, sort=None, per_page=None, page=None)
 Album section. More...
 
def vimeo_videos_search (self, query, sort=None, per_page=None, page=None)
 Video section. More...
 
def vimeo_channels_getAll (self, sort=None, per_page=None, page=None)
 Channel section. More...
 
def vimeo_channels_getVideos (self, channel_id=None, full_response=None, per_page=None, page=None)
 
def vimeo_test_echo (self, params={})
 Contacts section. More...
 
def vimeo_test_login (self)
 
def vimeo_test_null (self)
 
def vimeo_videos_upload_getQuota (self)
 Videos section. More...
 

Public Attributes

 curly
 
 key
 
 secret
 
 server
 
 port
 
 request_token_url
 
 access_token_url
 
 authorization_url
 
 consumer
 
 token
 

Private Member Functions

def _fetch_token (self, oauth_request)
 
def _do_vimeo_authenticated_call (self, method, parameters={})
 
def _do_vimeo_unauthenticated_call (self, method, parameters={})
 

Detailed Description

Class used for handling authenticated call to the API.

Definition at line 206 of file vimeo_api.py.

Constructor & Destructor Documentation

◆ __init__()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.__init__ (   self,
  key,
  secret,
  server = "vimeo.com",
  port = PORT,
  request_token_url = REQUEST_TOKEN_URL,
  access_token_url = ACCESS_TOKEN_URL,
  authorization_url = AUTHORIZATION_URL,
  token = None,
  token_secret = None 
)
You need to give both key (consumer key) and secret (consumer secret).
If you already have an access token (token+secret), you can use it
by giving it through token and token_secret parameters.
If not, then you need to call both get_request_token(), get_authorize_token_url() and
finally get_access_token().

Definition at line 211 of file vimeo_api.py.

Member Function Documentation

◆ get_request_token()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.get_request_token (   self)
Requests a request token and return it on success.

Definition at line 241 of file vimeo_api.py.

◆ get_authorize_token_url()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.get_authorize_token_url (   self)
Returns a URL used to verify and authorize the application to access
user's account. The pointed page should contain a simple 'password' that
acts as the 'verifier' in oauth.

Definition at line 252 of file vimeo_api.py.

◆ get_access_token()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.get_access_token (   self,
  verifier 
)
Should be called after having received the 'verifier' from the authorization page.
See 'get_authorize_token_url()' method.

Definition at line 264 of file vimeo_api.py.

◆ _fetch_token()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient._fetch_token (   self,
  oauth_request 
)
private
Sends a requests and interprets the result as a token string.

Definition at line 278 of file vimeo_api.py.

Referenced by nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.get_access_token(), and nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.get_request_token().

◆ vimeo_oauth_checkAccessToken()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_oauth_checkAccessToken (   self,
  auth_token 
)

Definition at line 285 of file vimeo_api.py.

◆ _do_vimeo_authenticated_call()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient._do_vimeo_authenticated_call (   self,
  method,
  parameters = {} 
)
private

◆ _do_vimeo_unauthenticated_call()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient._do_vimeo_unauthenticated_call (   self,
  method,
  parameters = {} 
)
private

◆ vimeo_albums_getAll()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_albums_getAll (   self,
  user_id,
  sort = None,
  per_page = None,
  page = None 
)

Album section.

Get a list of a user's albums.
This method does not require authentication.

Definition at line 320 of file vimeo_api.py.

◆ vimeo_videos_search()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_videos_search (   self,
  query,
  sort = None,
  per_page = None,
  page = None 
)

Video section.

Search for matching Videos.
This method does not require authentication.

Definition at line 340 of file vimeo_api.py.

◆ vimeo_channels_getAll()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_channels_getAll (   self,
  sort = None,
  per_page = None,
  page = None 
)

Channel section.

Get a list of all public channels.
This method does not require authentication.

Definition at line 365 of file vimeo_api.py.

◆ vimeo_channels_getVideos()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_channels_getVideos (   self,
  channel_id = None,
  full_response = None,
  per_page = None,
  page = None 
)
Get a list of Videos for a specific channels.
This method does not require authentication.

Definition at line 384 of file vimeo_api.py.

◆ vimeo_test_echo()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_test_echo (   self,
  params = {} 
)

Contacts section.

Groups section Groups Events section Groups forums section OAuth section People section Test section

This will just repeat back any parameters that you send.
No auth required

Definition at line 434 of file vimeo_api.py.

◆ vimeo_test_login()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_test_login (   self)
Is the user logged in?

Definition at line 446 of file vimeo_api.py.

◆ vimeo_test_null()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_test_null (   self)
This is just a simple null/ping test.

You can use this method to make sure that you are properly
contacting to the Vimeo API.

Definition at line 453 of file vimeo_api.py.

◆ vimeo_videos_upload_getQuota()

def nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.vimeo_videos_upload_getQuota (   self)

Videos section.

Videos comments section Videos embed section Videos Upload section

(from vimeo API documentation)
Get the space and number of HD uploads left for a user.

Numbers are provided in bytes. It's a good idea to check this
method before you upload a video to let the user know if their
video will be converted to HD. hd_quota will have a value of 0
if the user reached the max number of uploads, 1
otherwise. Resets is the number of the day of the week,
starting with Sunday.

Definition at line 480 of file vimeo_api.py.

Member Data Documentation

◆ curly

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.curly

◆ key

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.key

Definition at line 221 of file vimeo_api.py.

◆ secret

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.secret

Definition at line 222 of file vimeo_api.py.

◆ server

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.server

Definition at line 223 of file vimeo_api.py.

◆ port

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.port

Definition at line 224 of file vimeo_api.py.

◆ request_token_url

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.request_token_url

◆ access_token_url

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.access_token_url

◆ authorization_url

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.authorization_url

◆ consumer

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.consumer

◆ token

nv_python_libs.vimeo.vimeo_api.SimpleOAuthClient.token

The documentation for this class was generated from the following file: