This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |