Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 292 lines (214 sloc) 9.1 kB
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>connFu Node.js package - DSL for creating real time voice applications using connFu platform</title>
5
6 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
7 <link rel="stylesheet" media="all" href="docco.css" />
96f03ad @rafeca Added code highlighting to documentation code
rafeca authored
8 <link rel="stylesheet" media="all" href="stylesheets/sh_style.css" />
9
10 <script type="text/javascript" src="javascripts/sh_main.min.js"></script>
11 <script type="text/javascript" src="javascripts/sh_javascript.min.js"></script>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
12
13 <style type="text/css">
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
14 html {
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
15 background: #E4D9BE -webkit-gradient(radial, 50% 50%, 10, 50% 50%, 600, from(#e4d9be), to(#d5c49a));
16 background: #E4D9BE -moz-radial-gradient(circle , #e4d9be, #d5c49a 100%);
17 background: #E4D9BE radial-gradient(circle , #e4d9be, #d5c49a 100%);
18 }
19
20 .forkme {
21 position: absolute;
22 top: 0;
23 right: 0;
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
24 z-index: 1;
25 -webkit-transition-property: opacity;
26 -webkit-transition-duration: 0.2s;
27 -webkit-transition-timing-function: ease-out;
28 -moz-transition-property: opacity;
29 -moz-transition-duration: 0.2s;
30 -moz-transition-timing-function: ease-out;
31 }
32
33 .forkme:hover {
34 opacity: 0.6;
35 }
36
37 /** Build status img **/
38 h1 a img {
39 padding: 0 0 4px 15px;
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
40 }
41
42 #container {
43 width: 750px;
44 margin: 0 auto;
45 }
46
47 .powered {
48 border-top: 1px solid #999;
49 margin-top: 30px;
50 }
51
52 .powered span {
53 float: left;
54 padding: 20px 20px 0 0;
55 }
56
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
57 code {
58 background-color: #f1e0b6;
59 padding: 0 2px;
60 border: 1px solid #dab583;
61 }
62
63 pre code {
64 background-color: transparent;
65 padding: 0;
66 border: none;
67 }
68
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
69 pre {
70 margin: 25px 0;
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
71 padding: 5px 0 0 15px;
96f03ad @rafeca Added code highlighting to documentation code
rafeca authored
72 border-left: 5px solid #dab583;
73 color: #444;
74 font-weight: normal;
75 font-style: normal;
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
76 }
77
78 h2 {
79 margin-top: 30px;
80 border-bottom: 1px solid #999;
81 }
82
2a138e1 @rafeca Added changelog to documentation page
rafeca authored
83 h3 em {
84 font-weight: normal;
85 font-size: 14px;
86 }
87
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
88 a, a:visited {
89 color: #d11e27;
90 }
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
91
92 a:hover {
93 text-decoration: none;
94 }
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
95 </style>
96 </head>
97
98 <body>
99
100 <a class="forkme" href="http://github.com/bluevialabs/connfu-node">
101 <img src="https://a248.e.akamai.net/assets.github.com/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub">
102 </a>
103
104 <div id="container">
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
105 <h1><img src="images/connfu-logo.png" alt="connFu"></h1><h1>connFu Node.js DSL <a href="http://travis-ci.org/bluevialabs/connfu-node"><img src="https://secure.travis-ci.org/bluevialabs/connfu-node.png" alt="Build Status" title="" /></a></h1>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
106
9a6dab9 @rafeca Changed error handling on commands interface
rafeca authored
107 <p>connfu package provides an easy way to get access to <a href="http://connfu.com">connFu platform</a> using Node.js</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
108
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
109 <h2>How to install</h2>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
110
9a6dab9 @rafeca Changed error handling on commands interface
rafeca authored
111 <p>The eassiest way is by installing it from the <code>npm</code> repository:</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
112
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
113 <pre><code>$ npm install connfu
114 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
115
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
116 <p>If you'd prefer to install the latest master version of connFu, you can clone the <code>connfu-node</code> source repository
117 from GitHub and then install it using <code>npm</code>:</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
118
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
119 <pre><code>$ git clone "https://github.com/bluevialabs/connfu-node.git"
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
120
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
121 $ npm install -g connfu-node/
122 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
123
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
124 <h2>How to use it</h2>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
125
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
126 <h3>Connecting to streams</h3>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
127
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
128 <p>First, require <code>connfu</code> package:</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
129
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
130 <pre><code>var connFu = require('connfu');
131 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
132
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
133 <p>Next, create a basic application using your connFu API KEY:</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
134
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
135 <pre><code>var app = connFu.createApp('&lt;your_api_key&gt;');
136 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
137
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
138 <p>Then, attach some event handlers:</p>
139
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
140 <pre><code>app.on("voice", {
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
141 join: function(params){
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
142 console.log("The number " + params.from + " joined to the conference with number " + params.to);
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
143 },
144 leave: function(params){
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
145 console.log("The number " + params.from + " left the conference with number " + params.to);
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
146 }
147 });
148 </code></pre>
149
150 <p>Finally, just listen!</p>
151
152 <pre><code>app.listen();
153 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
154
d80587a @rafeca Very basic documentation on how to use the CLI
rafeca authored
155 <h3>Using the CLI</h3>
156
157 <p>When you install connFu node package, you get a CLI that allows you to do some common tasks fast and easily:</p>
158
159 <p><img src="http://bluevialabs.github.com/connfu-node/images/screenshot_cli.png" alt="CLI interface" title="" /></p>
160
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
161 <h3>Sending commands</h3>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
162
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
163 <p>The <code>connFu</code> package can also send commands to handle some aspects of the application:</p>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
164
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
165 <pre><code>var connFu = require('connfu');
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
166
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
167 // Init application
168 var app = connFu.createApp('&lt;your_api_key&gt;');
169
170 // Create a voice channel with a UK number
9a6dab9 @rafeca Changed error handling on commands interface
rafeca authored
171 app.commands.voice().create("conference", "uk", {welcome_message: "Welcome!"}, function(err, data){
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
172 // Add a number to the whitelist
9a6dab9 @rafeca Changed error handling on commands interface
rafeca authored
173 app.commands.voice("conference").whitelist().create("+44xxxxxx", "rafeca", function(err, data){
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
174 // Update the name of the recently whitelisted number
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
175 app.commands.voice("conference").whitelist("+4444xxxxxx").update("the wizard");
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
176 });
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
177 });
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
178
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
179 /* (...) */
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
180
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
181 // Delete the voice channel
72f7f21 @rafeca Switch to official markdown converter from DaringFireball
rafeca authored
182 app.commands.voice("conference").delete();
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
183 </code></pre>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
184
2abf5e9 @rafeca Improved the way to create the public web site
rafeca authored
185 <p>For more thorough examples, look at the following examples</p>
186
187 <h2>Examples</h2>
188
189 <p><a href="http://bluevialabs.github.com/connfu-node/fancy-connfu-application.html">fancy-connfu-application.js</a> - Very simple application that prints the events received from the streaming API</p>
190
191 <p><a href="http://bluevialabs.github.com/connfu-node/growl-notifier.html">growl-notifier.coffee</a> - CoffeeScript application that notfies via Growl the received events</p>
192
193 <p><a href="http://bluevialabs.github.com/connfu-node/commands.html">commands.js</a> - Express.js application that exposes all the DSL commands to a RESTful interface</p>
194
195 <h2>Running Tests</h2>
196
197 <p>To run the test suite first invoke the following command within the repo, installing the development dependencies:</p>
198
199 <pre><code>$ npm install --dev
200 </code></pre>
201
202 <p>then run the tests:</p>
203
204 <pre><code>$ npm test
205 </code></pre>
206
207 <h2>License</h2>
208
209 <p>(The MIT License)</p>
210
211 <p>Copyright (c) 2011 Rafael Oleza &lt;roa@tid.es&gt;</p>
212
213 <p>Permission is hereby granted, free of charge, to any person obtaining
214 a copy of this software and associated documentation files (the
215 'Software'), to deal in the Software without restriction, including
216 without limitation the rights to use, copy, modify, merge, publish,
217 distribute, sublicense, and/or sell copies of the Software, and to
218 permit persons to whom the Software is furnished to do so, subject to
219 the following conditions:</p>
220
221 <p>The above copyright notice and this permission notice shall be
222 included in all copies or substantial portions of the Software.</p>
223
224 <p>THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
225 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
226 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
227 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
228 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
229 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
230 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
2a138e1 @rafeca Added changelog to documentation page
rafeca authored
231 <h2>Change Log</h2>
232
a909d81 @rafeca Bump version to 0.2.0
rafeca authored
233 <h3>0.2.0 — <em>October 6, 2011</em></h3>
234
235 <ul>
236 <li>Added <code>connfu</code> CLI to allow fast and easy application manipulation </li>
237 </ul>
238
1651779 @rafeca Bump version to 0.1.1
rafeca authored
239 <h3>0.1.1 — <em>October 5, 2011</em></h3>
240
241 <ul>
242 <li><code>connfu-node</code> is now public</li>
243 <li>Improved documentation</li>
244 <li>Added <code>gh-pages</code> with a public web page that is generated automatically</li>
245 <li>Integration with Travis CI service</li>
246 </ul>
247
2a138e1 @rafeca Added changelog to documentation page
rafeca authored
248 <h3>0.1.0 — <em>Sept 9, 2011</em></h3>
249
250 <ul>
251 <li>Added Twitter provisioning commands</li>
252 <li>Added multiple phone number provisioning commands</li>
253 <li>Added the new optional parameters to voice channels (welcome messages and privacy)</li>
254 <li>Fixed bug in getAllVoiceChannels() command</li>
255 <li>Updated connFu hostnames to the pre-release ones</li>
256 <li>Improved the example applications</li>
257 <li>Added a new CoffeeScript example application that shows events in Growl</li>
258 <li>Added inline documentation to example applications</li>
259 </ul>
260
261 <h3>0.0.4 — <em>August 24, 2011</em></h3>
262
263 <ul>
264 <li>Added the ability to send RSS commands via the connFu REST API</li>
265 <li>Standarized the format of the events data</li>
266 <li>Added autotest feature to ease the BDD development</li>
267 </ul>
268
269 <h3>0.0.3 — <em>July 28, 2011</em></h3>
270
271 <ul>
272 <li>Added the ability to send voice commands via the connFu REST API</li>
273 </ul>
274
275 <h3>0.0.2 — <em>July 27, 2011</em></h3>
276
277 <ul>
278 <li>Added a logging system to ease the debugging</li>
279 </ul>
280
281 <h3>0.0.1 — <em>July 26, 2011</em></h3>
282
283 <ul>
284 <li>Initial release</li>
285 </ul>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
286
287 <p class="powered"><span>Powered by: </span><a href="http://bluevia.com" title="Bluevia Labs"><img src="images/bluevia-logo.png" alt="Bluevia Labs"></a>
288 </div>
96f03ad @rafeca Added code highlighting to documentation code
rafeca authored
289
290 <script type="text/javascript">sh_highlightDocument();</script>
be0d4a5 @rafeca Added index.html file to docs
rafeca authored
291 </body>
292 </html>
Something went wrong with that request. Please try again.