Skip to content

This script provides the interface with Ooyala API with Python 3

Notifications You must be signed in to change notification settings

ooyala/python-v3-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Python 3 SDK

The Python SDK is a client class for our V3 API. It allows you to do GET, POST, PUT, PATCH and DELETE requests to our API by simply specifying the path to the and a (dictionary) parameter to represent the (JSON) data you want to send.

Basic Usage

As a simple example to get those assets having the label 'Funny dogs', try these steps on the console:

  1. Go the folder where this file resides
$ cd python-v3-sdk
  1. Invoke the Python interpreter
$ python3
  1. Load the API module
>>> from api import OoyalaAPI
  1. Create an OoyalaAPI object by passing your V2 API keys:
>>> api = OoyalaAPI("<Your API Key>", "<Your Secret Key>")
  1. Get all assets having the "Funny dogs" label:
 >>> parameters = {'where': "labels INCLUDES 'Funny dogs'"}
 >>> assets = api.get('assets', parameters)['items']
  1. Now that we have our results on the assets array, lets print them embed codes and names
>>> for asset in assets:
      print ("%s - %s" % (asset['embed_code'], asset['name']))

You can do much more that just querying for assets, type

>>> help(OoyalaAPI)

to get a complete documentation. Its that easy to work with this SDK!

About

This script provides the interface with Ooyala API with Python 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages