Skip to content

Instantly share code, notes, and snippets.

View nag-cheedella's full-sized avatar

nag-cheedella

View GitHub Profile
@nag-cheedella
nag-cheedella / ooyala_api_call_with_signature.rb
Created July 13, 2018 18:26
Ruby script to ingest thumbnails for Ooyala Video Assets
#!/usr/bin/env ruby
# Author : Ooyala
# Date : 13-Jul-2018
# Purpose: Integrate with Ooyala API using signatures.
# This script uses Ooyala's algorithm for signing http requests documented under
# https://help.ooyala.com/video-platform/tasks/api_signing_requests.html
# Usage : ruby ooyala_api_call_with_signature.rb
# Pre-requisites: Ooyala Backlot account api_key, secret, asset embed_code, sample jpg file.
# install necessary gems listed in require section.
# Example demonstrated: Using Ooyala API to ingest preview image file
@nag-cheedella
nag-cheedella / content_replacement.php
Created October 4, 2017 19:32
Ooyala Backlot API based Video Asset Content Replacement
<?php
#This is a standalone script for doing Content Replacement in Ooyala Backlot
#This script requires Ooyala API SDK available at https://github.com/ooyala/php-v2-sdk
#1. Clone the SDK Repo from https://github.com/ooyala/php-v2-sdk
#2. Keep the file in the repo
#3. Update API Key, Secret, Embed Code, FileName
#4. Run "php content_replacement.php"
set_time_limit(36000);
ini_set('memory_limit', '50G');
@nag-cheedella
nag-cheedella / OoyalaAPITest.java
Last active September 19, 2017 16:59
Ooyala API Signature generation example
//This gist is to generate signatures for making api calls to Ooyala Backlot APIs.
// This was prepared using the logic defined in http://help.ooyala.com/video-platform/tasks/api_signing_requests.html
// Alternatively, ooyala API SDK can be used. A sample ruby SDK is available here https://github.com/ooyala/ruby-v2-sdk
var c = test.openHttpClient();
//Insert the API key and Secret of your Ooyala account
var api_key="";
var secret = "";
@nag-cheedella
nag-cheedella / ooyala-api-decode-html-elements
Last active May 20, 2017 21:33
Decode html elements in Ruby. Example written on how to use ooyala ruby sdk to interact with apis
#!/usr/bin/ruby
#simple snippet to decode html elements in ruby
# Uses Ooyala Ruby SDK. Read the usage of SDK first at https://github.com/ooyala/ruby-v2-sdk
require './ooyala_api'
require 'htmlentities'
apikey = "<<api-key>>"
secret = "<<secret>>"
api = Ooyala::API.new(apikey, secret)