Skip to main content

Video API

Project description

videoguys-python-client

Official API

  • API version: 0.1
  • Package version: 0.1.0

Requirements.

Python 3.5+

Setuptools

Install via Setuptools (for local testing).

pip install --user --upgrade pip
pip install --user --upgrade setuptools
sudo python setup.py install --user --prefix=

Or

Install via Pip (easiest method).

sudo python -m pip install videoguys

Then import the package:

import videoguys

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import sys
import videoguys

from pprint import pprint

api_client = videoguys.ApiClient(
  api_token="<api_key>", api_host="[vevio|vidup]"
)

try:
    pair_response = api_client.getVideoPair("<video_code>")
    pprint(pair_response)

    video_info = api_client.getVideoInfo("<video_code>")
    pprint(video_info)

    filepath = "absolute_path_to_file"
    video_upload = api_client.uploadVideo(
      filepath=filepath, # required filepath for the new video upload
      # size=size, # optional in this function, filepath will auto determine the size
      title=title, # optional title for the new video
      description=description, # optional description for the new video
      folder_id=folder_id, # optional folder_id for the new video
      lite=lite, # optional lite setting for the new video [0 or 1]
      public=public, # optional public setting for the new video [0 or 1]
    )
    pprint(video_upload)

    video_uploads = api_client.getVideoUploads()
    pprint(video_uploads)

    video_upload = api_client.updateVideoUpload(
      <upload_code>,
      title=title, # optional new title for the new video
      description=description, # optional new description for the new video
      folder_id=folder_id, # optional new folder_id for the new video
      lite=lite, # optional new lite setting for the new video [0 or 1]
      public=public, # optional new public setting for the new video [0 or 1]
    )
    pprint(video_upload)

    video_upload = api_client.getVideoUpload(<upload_code>)
    pprint(video_upload)

    deleted_video_upload = api_client.deleteVideoUpload(<upload_code>)
    pprint(deleted_video_upload)

    url = "http/https file url"
    url_upload = api_client.newUrlUpload(
      url=url, # required url for the new url upload
      title=title, # optional title for the new url
      description=description, # optional description for the new url
      folder_id=folder_id, # optional folder_id for the new url
      lite=lite, # optional lite setting for the new url [0 or 1]
      public=public, # optional public setting for the new url [0 or 1]
    )
    pprint(url_upload)

    url_uploads = api_client.getUrlUploads()
    pprint(url_uploads)

    url_upload = api_client.updateUrlUpload(
      <upload_code>,
      title=title, # optional new title for the new url
      description=description, # optional new description for the new url
      folder_id=folder_id, # optional new folder_id for the new url
      lite=lite, # optional new lite setting for the new url [0 or 1]
      public=public, # optional new public setting for the new url [0 or 1]
    )
    pprint(url_upload)

    url_upload = api_client.getUrlUpload(<upload_code>)
    pprint(url_upload)

    url_upload_status = api_client.getUrlUploadStatus(<upload_code>)
    pprint(url_upload_status)

    # if the url upload has been downloaded then you should clear it
      # to avoid concurrent hitting limits
    if (url_upload_status and
        'status' in url_upload_status and
        url_upload_status['status'] == "downloaded"):

        deleted_url_upload = api_client.deleteUrlUpload(<upload_code>)
        pprint(deleted_url_upload)
except ValueError as e:
    print("%s" % e)
except videoguys.ErrorWithResponse as e:
    print("%s" % e.response.body['message'])
except:
    print("Unexpected error:", sys.exc_info()[0])

Documentation For Authorization

All endpoints except getVideoInfo("<video_code>") and getVideoPair("<video_code>") requires authorization.

Author

VideoGuys

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

videoguys-0.0.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

videoguys-0.0.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file videoguys-0.0.4.tar.gz.

File metadata

  • Download URL: videoguys-0.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for videoguys-0.0.4.tar.gz
Algorithm Hash digest
SHA256 454c23f495d039ad4f0466af20c1a83e8d5f7c49e64bdbc725227ea2e36c6485
MD5 d324bdd462353fdf599112798e78548b
BLAKE2b-256 0a4344032970cc4d7dbb59b25b031cfeef8b39889b1113383a5824041c93feaa

See more details on using hashes here.

File details

Details for the file videoguys-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: videoguys-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3

File hashes

Hashes for videoguys-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7a1f2710266c965041de28975d28871ed24b6af8963d135cddaeb0084e99a2
MD5 fbe0a07232d314757fe7193058fe80b0
BLAKE2b-256 85096169c9516f2bcebdc208a143b6e14d8c99e60dfdba958c43a498b67b5ba1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page