public
Description: Fliqz4R is a Ruby wrapper for Fliqz‘s Video Web Service and Search Web Service API.
Homepage: http://fliqz.learnhub.com/lesson/page/321-how-to-use-fliqz4-r
Clone URL: git://github.com/libin/fliqz4r.git
Libin Pan (author)
Fri Apr 25 20:56:56 -0700 2008
fliqz4r / README
100644 181 lines (127 sloc) 5.933 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
= Fliqz4R
 
Fliqz4R is a Ruby wrapper for Fliqz's Video Web Service and Search Web Service API.
 
Author:: Libin Pan (mailto:libin.pan@savvica.com)
License:: MIT
Type:: Rails Web Services Plugin
 
=== 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:
  - For Video Web Services, please check lib/VideoServiceDriver.rb
  - For Search Web Services, please check lib/VideoSearchServiceDriver.rb
  
* Parameters:
  - For Video Web Services, please check lib/VideoServiceMappingRegistry.rb
  - For Search Web Services, please check lib/VideoSearchServiceMappingRegistry.rb
 
* Structure of parameters
  - Please use hash to pass the parameters, such as :VideoID => video_id
 
=== Response Object
 
* All the structure of return objects are listed in:
  - For Video Web Services, please check lib/VideoServiceMappingRegistry.rb
  - 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
* <tt>fliqz_uploader_tag</tt>
  - Create an embedded Fliqz Flash Uploader with all the default
    options
* <tt>fliqz_uploader_tag {:bgcolor => '#fff'}</tt>
  - Create an embedded Fliqz Flash Uploader with white background
    color
* <tt>fliqz_uploader_tag {:bgcolor => '#fff'}, {:fontColor => '#000'}</tt>
  - Create an embedded Fliqz Flash Uploader with white background
    color and black font color
 
==== Flash Options
* <b>bgcolor</b>
  - the background color of the Flash player; default '#869ca7'
* <b>width</b>
  - the width of the Flash player; default '450'
* <b>height</b>
  - the height of the Flash player; default '345'
* <b>name</b>
  - the name of the Flash player; default 'baseuploader'
* <b>align</b>
  - the align of the Flash player; default 'middle'
* <b>play</b>
  - the play option of the Flash player; default 'true'
* <b>loop</b>
  - the loop option of the Flash player; default 'false'
* <b>quality</b>
  - the quality option of the Flash player; default 'high'
* <b>wmode</b>
  - the wmode option of the Flash player; default 'transparent'
* <b>allowscriptaccess</b>
  - the allowscriptaccess option of the Flash player; default 'always'
* <b>src</b>
  - the src option of the Flash player;
    default 'http://upload.fliqz.com/base/swf/baseuploader.swf'
 
==== Fliqz Options
Please reference http://upload.fliqz.com/base/ for more detail on
these options.
* <b>errorPage</b>
  - A URL responses to unsuccessful upload; default nil
* <b>successPage</b>
  - A URL responses to successful upload; default 'http://upload.fliqz.com/base/htm/SuccessPage.htm'
* <b>returnEmbedAndPerma</b>
  - A Boolean parameter which determines the content of screen
    displayed by the uploader after a successful upload; default nil
* <b>hideControlButtons</b>
  - A Boolean parameter which engages a buttonless mode of operation.
* <b>illegalFileTypes</b>
  - This parameter restricts the list of file types uploadable by the
    uploader; default nil
* <b>fontFamily</b>
  - This overides the name of the default font family used by the text
    elements; default nil
* <b>fontColor</b>
  - 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 <tt>rake test</tt> 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.