Jump To Content

LearnHub




How to use Fliqz4R

About Fliqz

Fliqz is the leader in full-service, plug-and-play video solutions. The company offers the most flexible video solutions available online, providing seamless integration and full customization to companies of any size. Fliqz eliminates traditional barriers to online video by removing the complexity associated with both site implementation and user deployment, ensuring that there is no code to develop, no infrastructure to own, and no software to maintain. The company maintains a customer network of more than 500 sites worldwide and is based in Emeryville, Calif. Additional information can be found at www.fliqz.com .

Fliqz4R

Fliqz4R is a Ruby wrapper for Fliqz's Video Web Service and Search Web Service API.

Requirements

* SOAP4R gem library. At the time of this writing, the latest version was v1.5.8, which works fine. The stub files were created under 1.5.8, and have been made some changes to work with SOAP4R gem versions.

Please install SOAP4R as if you don't have it yet:

sudo gem install soap4r

* Account ID from your Fliqz account

Please register an account on Fliqz.com before your start. It is free at this moment:

http://myvideos.fliqz.com/controlpanel/aspx/secure/RegisterForSelfServe.aspx

Then you can find your account id from:

http://myvideos.fliqz.com/ControlPanel/aspx/AccountInfo.aspx

Installation

* Install Fliqz4R as a Rails plugin

script/plugin install http://svn.savvica.com/public/plugins/fliqz4r

After the installation, you can find an extra yaml file under your config folder:

config/fliqz_account.yml

Please open this file and put your Fliqz account id into it. Save it before close.
* Or install Fliqz4R as a Ruby Gem

Download fliqz4r gem from http://svn.savvica.com/public/plugins/fliqz4r/fliqz4r-0.1.0.gem

Run this command:

sudo gem install fliqz4r-0.1.0.gem

Getting Started

* If you installed Fliqz4R as a Ruby Gem, please put

require 'fliqz'

at the top of your programs.
* If you installed Fliqz4R as a Rails plugin, there is no need for that.

Examples

Say you have uploaded a video and Fliqz Uploader calls back tell you that:

video_id = '279272123d53d9473ea9352dca0dfdae'

If you want to know more about this video, you can do:

fliqz = Fliqz::VideoAPI.new
video = fliqz.getVideoInfo(:VideoID => video_id)
@video_title = video.title # => 'Video 5'
@embed_tag = video.embed # => '<object><embed...'

Pretty simple.

To use Fliqz Search Web Service, you need provide Fliqz Account ID.

* If you installed as a Ruby Gem:

account_id = 'af3dc64631cd47438a495cc618ca83f2'
fliqz = Fliqz::SearchAPI.new(account_id)

* If you installed as a Rails plugin:

fliqz = Fliqz::SearchAPI.new()

If you want to search video by Upload Date:

title = fliqz.getByUploadDate(:pageSize => 5, :maxResult => 10).group.title
# => 'Videos for account...'

Format of Request

* API calling methods are all listed in two files:
o For Video Web Services, please check lib/VideoServiceDriver.rb
o For Search Web Services, please check lib/VideoSearchServiceDriver.rb
* Parameters:
o For Video Web Services, please check lib/VideoServiceMappingRegistry.rb
o For Search Web Services, please check lib/VideoSearchServiceMappingRegistry.rb
* Structure of parameters
o Please use hash to pass the parameters, such as :VideoID => video_id
Response Object

* All the structure of return objects are listed in:
o For Video Web Services, please check lib/VideoServiceMappingRegistry.rb
o For Search Web Services, please check lib/VideoSearchServiceMappingRegistry.rb

Fliqz Flash Uploader Helper

Creates a embed tag that display a Fliqz Flash Uploader within an HTML page.

To use Fliqz Flash Uploader helper, please install Fliqz4R as a Rails plugin for now.
Examples

* fliqz_uploader_tag
o Create an embedded Fliqz Flash Uploader with all the default options
* fliqz_uploader_tag {:bgcolor => 'fff'}
o Create an embedded Fliqz Flash Uploader with white background color
* fliqz_uploader_tag {:bgcolor => 'fff'}, {:fontColor => '000'}
o Create an embedded Fliqz Flash Uploader with white background color and black font color

Flash Options

* bgcolor
o the background color of the Flash player; default '869ca7'
* width
o the width of the Flash player; default '450'
* height
o the height of the Flash player; default '345'
* name
o the name of the Flash player; default 'baseuploader'
* align
o the align of the Flash player; default 'middle'
* play
o the play option of the Flash player; default 'true'
* loop
o the loop option of the Flash player; default 'false'
* quality
o the quality option of the Flash player; default 'high'
* wmode
o the wmode option of the Flash player; default 'transparent'
* allowscriptaccess
o the allowscriptaccess option of the Flash player; default 'always'
* src
o the src option of the Flash player; default 'upload.fliqz.com/base/swf/baseuploader.swf'

Fliqz Options

Please reference upload.fliqz.com/base/ for more detail on these options.

* errorPage
o A URL responses to unsuccessful upload; default nil
* successPage
o A URL responses to successful upload; default 'upload.fliqz.com/base/htm/SuccessPage.htm'
* returnEmbedAndPerma
o A Boolean parameter which determines the content of screen displayed by the uploader after a successful upload; default nil
* hideControlButtons
o A Boolean parameter which engages a buttonless mode of operation.
* illegalFileTypes
o This parameter restricts the list of file types uploadable by the uploader; default nil
* fontFamily
o This overides the name of the default font family used by the text elements; default nil
* fontColor
o This overides the color of the font used by the text elements; default nil

Notes

* You will need to be connected to the internet to utilize the remote features of the plugin and to properly run the tests.
* To run the tests type rake test in the console from the plugin's root directory.
* If you installed as a Rails plugin, please make sure you already have the right account information defined in your config/fliqz_account.yml file.


  1. nelliemuller saidTue, 15 Apr 2008 04:09:48 -0000 ( Link )

    Excellent lesson! Thank you for sharing.

    Actions
    Vote
    Current Rating
    0
    Rate Up
    Rate Down
    No Votes

    Post Comments

  2. cybervio saidSat, 24 Jan 2009 01:58:57 -0000 ( Link )

    can’t download?

    Actions
    Vote
    Current Rating
    0
    Rate Up
    Rate Down
    No Votes

    Post Comments

  3. Libin saidSat, 24 Jan 2009 02:52:42 -0000 ( Link )

    Moving to Github right now. Please come back tomorrow and I’ll update the lesson as well.

    Thanks!

    Actions
    Vote
    Current Rating
    0
    Rate Up
    Rate Down
    No Votes

    Post Comments

Your Comment
Textile is Enabled (View Reference)