http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/fef1e81c/templates/classification/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/classification/quickstart/index.html 
b/templates/classification/quickstart/index.html
index e676668..97d67e6 100644
--- a/templates/classification/quickstart/index.html
+++ b/templates/classification/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp1 |    1 | 
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp2 |    2 | 
io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span 
class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect some training data. By default, the Classification Engine 
Template reads 4 properties of a user record: attr0, attr1, attr2 and plan. 
This templates requires &#39;$set&#39; user events.</p><div 
class="alert-message info"><p>This template can easily be customized to use 
different or more number of attributes.</p></div> <p>You can send these events 
to PredictionIO Event Server in real-time easily by making a HTTP request or 
through the provided SDK. Please see <a href="/appintegration/">App Integration 
Overview</a> for more details how to integrate your app with 
SDK.</p><p>Let&#39;s try sending events to EventServer with the following 
<code>curl</code> commands (The corresponding SDK code is showed in other 
tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key 
generated in above steps. Note that <code>loc
 alhost:7070</code> is the default URL of the Event Server.</p><p>For 
convenience, set your access key to the shell variable, run:</p><p><code>$ 
ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>To set 
properties &quot;attr0&quot;, &quot;attr1&quot;, &quot;attr2&quot; and 
&quot;plan&quot; for user &quot;u0&quot; on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send <code>$set</code> event for the user. 
To send this event, run the following <code>curl</code> command:</p><div 
class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-ab9a71f2-8c47-492d-84d0-0287505d6d9b">REST API</a></li> <li 
data-lang="python"><a href="#tab-9e70c175-5994-4396-a3a4-c6d46b3bd3db">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-565564da-50ce-4eef-bd2c-35ed66cab3da">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-5a213dbb-9d59-4987-a5cc-6d34427381bb">Ruby 
SDK</a></li> <li data-lang="java"><a href="#
 tab-7c158325-ee15-449e-8028-6d70f696d715">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-ab9a71f2-8c47-492d-84d0-0287505d6d9b"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect some training data. By default, the Classification Engine 
Template reads 4 properties of a user record: attr0, attr1, attr2 and plan. 
This templates requires &#39;$set&#39; user events.</p><div 
class="alert-message info"><p>This template can easily be customized to use 
different or more number of attributes.</p></div> <p>You can send these events 
to PredictionIO Event Server in real-time easily by making a HTTP request or 
through the provided SDK. Please see <a href="/appintegration/">App Integration 
Overview</a> for more details how to integrate your app with 
SDK.</p><p>Let&#39;s try sending events to EventServer with the following 
<code>curl</code> commands (The corresponding SDK code is showed in other 
tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key 
generated in above steps. Note that <code>loc
 alhost:7070</code> is the default URL of the Event Server.</p><p>For 
convenience, set your access key to the shell variable, run:</p><p><code>$ 
ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>To set 
properties &quot;attr0&quot;, &quot;attr1&quot;, &quot;attr2&quot; and 
&quot;plan&quot; for user &quot;u0&quot; on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send <code>$set</code> event for the user. 
To send this event, run the following <code>curl</code> command:</p><div 
class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-a7afe219-989a-48f2-a4ca-6654cb7b951a">REST API</a></li> <li 
data-lang="python"><a href="#tab-8e3899d9-07e2-4fdd-a562-34792e08d684">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-bf455db1-09d6-4864-8c21-881fd9f556c0">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-aa7a08eb-7357-48c7-a105-5b2950192de7">Ruby 
SDK</a></li> <li data-lang="java"><a href="#
 tab-53c74e5f-0216-49f1-ad80-d2d1eedc3a3b">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-a7afe219-989a-48f2-a4ca-6654cb7b951a"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -59,7 +59,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-9e70c175-5994-4396-a3a4-c6d46b3bd3db"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-8e3899d9-07e2-4fdd-a562-34792e08d684"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -100,7 +100,7 @@ Your system is all ready to go.
       <span class="s">"plan"</span> <span class="p">:</span> <span 
class="nb">int</span><span class="p">(</span><span class="o">&lt;</span><span 
class="n">VALUE</span> <span class="n">OF</span> <span 
class="n">PLAN</span><span class="o">&gt;</span><span class="p">)</span>
     <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-565564da-50ce-4eef-bd2c-35ed66cab3da"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-bf455db1-09d6-4864-8c21-881fd9f556c0"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -137,7 +137,7 @@ Your system is all ready to go.
    <span class="p">)</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-5a213dbb-9d59-4987-a5cc-6d34427381bb"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-aa7a08eb-7357-48c7-a105-5b2950192de7"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -168,7 +168,7 @@ Your system is all ready to go.
     <span class="p">}</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-7c158325-ee15-449e-8028-6d70f696d715"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-53c74e5f-0216-49f1-ad80-d2d1eedc3a3b"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -203,7 +203,7 @@ Your system is all ready to go.
         <span class="s">"plan"</span><span class="o">,</span> <span 
class="o">&lt;</span><span class="n">VALUE</span> <span class="n">OF</span> 
<span class="n">PLAN</span><span class="o">&gt;</span>
     <span class="o">));</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">event</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>Note that you can 
also set the properties for the user with multiple <code>$set</code> events 
(They will be aggregated during engine training).</p><p>To set properties 
&quot;attr0&quot;, &quot;attr1&quot; and &quot;attr2&quot;, and 
&quot;plan&quot; for user &quot;u1&quot; at different time, you can send 
following <code>$set</code> events for the user. To send these events, run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-2932a7a9-6195-421d-88fb-44aa9a1e30f9">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-0be5da75-a322-47fc-8102-0178be5612d2">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-bab5dfe1-e1aa-4912-ad55-9646db9391f9">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-6b071537-1d78-4bfc-afcd-4f3f27c81f53">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-29362274-f417-4347-baf2-7204d40f6348">Java 
SDK</a></li> </ul> <div data-ta
 b="REST API" data-lang="json" id="tab-2932a7a9-6195-421d-88fb-44aa9a1e30f9"> 
<div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>Note that you can 
also set the properties for the user with multiple <code>$set</code> events 
(They will be aggregated during engine training).</p><p>To set properties 
&quot;attr0&quot;, &quot;attr1&quot; and &quot;attr2&quot;, and 
&quot;plan&quot; for user &quot;u1&quot; at different time, you can send 
following <code>$set</code> events for the user. To send these events, run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-ecf646a7-8d77-4398-aa4a-403ae757fe53">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-4d5a194f-94eb-4958-b9a8-d5cfd662ae1d">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-058139b4-cd20-4b1c-a34c-47fbcb1f0cd6">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-8ae4e79f-2a25-43c1-aeec-0f1d86f2a627">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-e9b82419-1d61-4e73-93a9-6e87d4be8e46">Java 
SDK</a></li> </ul> <div data-ta
 b="REST API" data-lang="json" id="tab-ecf646a7-8d77-4398-aa4a-403ae757fe53"> 
<div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -274,7 +274,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-0be5da75-a322-47fc-8102-0178be5612d2"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-4d5a194f-94eb-4958-b9a8-d5cfd662ae1d"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -327,7 +327,7 @@ Your system is all ready to go.
       <span class="s">"plan"</span> <span class="p">:</span> <span 
class="nb">int</span><span class="p">(</span><span class="o">&lt;</span><span 
class="n">VALUE</span> <span class="n">OF</span> <span 
class="n">PLAN</span><span class="o">&gt;</span><span class="p">)</span>
     <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-bab5dfe1-e1aa-4912-ad55-9646db9391f9"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-058139b4-cd20-4b1c-a34c-47fbcb1f0cd6"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -390,7 +390,7 @@ Your system is all ready to go.
 <span class="p">));</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-6b071537-1d78-4bfc-afcd-4f3f27c81f53"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-8ae4e79f-2a25-43c1-aeec-0f1d86f2a627"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -433,7 +433,7 @@ Your system is all ready to go.
 <span class="p">)</span>
 
 <span class="c1"># Etc...</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-29362274-f417-4347-baf2-7204d40f6348"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-e9b82419-1d61-4e73-93a9-6e87d4be8e46"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -497,17 +497,17 @@ Your system is all ready to go.
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed 
successfully and running, you should see a console message similar to the 
following:</p><div class="highlight shell"><table style="border-spacing: 
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span 
class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind 
successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve 
predicted results. For example, to predict the label (i.e. <em>plan</em> in 
this case) of a user with attr0=2, attr1=0 and attr2=0, you send this JSON 
<code>{ &quot;attr0&quot;:2, &quot;attr1&quot;:0, &quot;attr2&quot;:0 }</code> 
to the deployed engine and it will return a JSON of the predicted plan. Simply 
send a query by making a HTTP request or through the <code>EngineClient</code> 
of an SDK.</p><p>With the deployed engine running, open another terminal and 
run the following <code>curl</code> command or use SDK t
 o send the query:</p><div class="tabs"> <ul class="control"> <li 
data-lang="bash"><a href="#tab-08b894da-d825-425c-8931-cf5295e983e9">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-28476a08-f813-4c8d-80c4-c9bdb6745c78">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-4ad6da27-fdae-47dd-b44a-6386491c46f6">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-99e9e2d1-7d1a-4119-9ada-0b4227d38b15">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-dc01600f-347b-451e-a911-7f3e2e055a9d">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="bash" 
id="tab-08b894da-d825-425c-8931-cf5295e983e9"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can try to retrieve 
predicted results. For example, to predict the label (i.e. <em>plan</em> in 
this case) of a user with attr0=2, attr1=0 and attr2=0, you send this JSON 
<code>{ &quot;attr0&quot;:2, &quot;attr1&quot;:0, &quot;attr2&quot;:0 }</code> 
to the deployed engine and it will return a JSON of the predicted plan. Simply 
send a query by making a HTTP request or through the <code>EngineClient</code> 
of an SDK.</p><p>With the deployed engine running, open another terminal and 
run the following <code>curl</code> command or use SDK t
 o send the query:</p><div class="tabs"> <ul class="control"> <li 
data-lang="bash"><a href="#tab-01109253-c4ff-4bb5-8c49-831496287719">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-676f538e-0c68-4dea-a40a-150a757ac512">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-873767c4-d307-4c91-8431-7f6e6872e1e9">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-cff8b717-be1b-4efa-8075-b9ebfe4208ef">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-adb2eb3e-e21d-4d26-a69d-835b62d79cfe">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="bash" 
id="tab-01109253-c4ff-4bb5-8c49-831496287719"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span 
class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "attr0":2, "attr1":0, "attr2":0 }'</span> 
http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-28476a08-f813-4c8d-80c4-c9bdb6745c78"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-676f538e-0c68-4dea-a40a-150a757ac512"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span 
class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span 
class="n">predictionio</span><span class="o">.</span><span 
class="n">EngineClient</span><span class="p">(</span><span 
class="n">url</span><span class="o">=</span><span 
class="s">"http://localhost:8000";</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span 
class="o">.</span><span class="n">send_query</span><span 
class="p">({</span><span class="s">"attr0"</span><span class="p">:</span><span 
class="mi">2</span><span class="p">,</span> <span class="s">"attr1"</span><span 
class="p">:</span><span class="mi">0</span><span class="p">,</span> <span 
class="s">"attr2"</span><span class="p">:</span><span class="mi">0</span><span 
class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-4ad6da27-fdae-47dd-b44a-6386491c46f6"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-873767c4-d307-4c91-8431-7f6e6872e1e9"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -526,7 +526,7 @@ Your system is all ready to go.
 <span class="nb">print_r</span><span class="p">(</span><span 
class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-99e9e2d1-7d1a-4119-9ada-0b4227d38b15"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-cff8b717-be1b-4efa-8075-b9ebfe4208ef"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -539,7 +539,7 @@ Your system is all ready to go.
 <span class="n">response</span> <span class="o">=</span> <span 
class="n">client</span><span class="p">.</span><span 
class="nf">send_query</span><span class="p">(</span><span 
class="s1">'attr0'</span> <span class="o">=&gt;</span> <span 
class="mi">2</span><span class="p">,</span> <span class="s1">'attr1'</span> 
<span class="o">=&gt;</span> <span class="mi">0</span><span class="p">,</span> 
<span class="s1">'attr2'</span> <span class="o">=&gt;</span> <span 
class="mi">0</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-dc01600f-347b-451e-a911-7f3e2e055a9d"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-adb2eb3e-e21d-4d26-a69d-835b62d79cfe"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/fef1e81c/templates/complementarypurchase/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/complementarypurchase/quickstart/index.html 
b/templates/complementarypurchase/quickstart/index.html
index 385bb6d..021ebbe 100644
--- a/templates/complementarypurchase/quickstart/index.html
+++ b/templates/complementarypurchase/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp1 |    1 | 
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp2 |    2 | 
io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span 
class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, Complementary 
Purchase Engine Template supports the following entities: 
<strong>user</strong>, <strong>item</strong>. A user buys an item. This 
template requires user-buy-item events.</p><p>Note that the engine requires 
correct buy event time being used in order to determine if the items being 
bought are in the same &#39;basket&#39;, which is configured by the 
&#39;basketWindow&#39; parameter. Using an unreal event time for the buy events 
will cause an incorrect model. If you use SDK, the current time is used as 
event time by default.</p><div class="alert-message warning"><p>In particular, 
make sure correct event time is specified if you import data in batch (i.e. not 
in real time). If the event time is omitted, the SDK will use <strong>current 
time</strong> as event time which 
 is not the actual time of the buy event in this case!</p></div> <p>You can 
send these events to PredictionIO Event Server in real-time easily by making a 
HTTP request or through the provided SDK. Please see <a 
href="/appintegration/">App Integration Overview</a> for more details how to 
integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer 
with the following <code>curl</code> commands (The corresponding SDK code is 
showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the 
Access Key generated in above steps. Note that <code>localhost:7070</code> is 
the default URL of the Event Server.</p><p>For convenience, set your access key 
to the shell variable, run:</p><p><code>$ 
ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>When an 
user u0 buys item i0 on time <code>2014-11-02T09:39:45.618-08:00</code> 
(current time will be used if eventTime is not specified), you can send a buy 
event. Run the following <code>curl</code> command:
 </p><div class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-7bd1ddf1-a4e6-4f64-85e7-8028fb03d744">REST API</a></li> <li 
data-lang="python"><a href="#tab-957df331-8f9a-41b2-89f8-0ee28cc4ec23">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-1bd6b063-d555-44c4-b160-b5521ccd314d">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-0c6e8b74-4f39-4316-bb2b-7d963815a2d7">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-1e0a015e-e1ab-458b-b3fc-73a98ffdcdb4">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-7bd1ddf1-a4e6-4f64-85e7-8028fb03d744"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, Complementary 
Purchase Engine Template supports the following entities: 
<strong>user</strong>, <strong>item</strong>. A user buys an item. This 
template requires user-buy-item events.</p><p>Note that the engine requires 
correct buy event time being used in order to determine if the items being 
bought are in the same &#39;basket&#39;, which is configured by the 
&#39;basketWindow&#39; parameter. Using an unreal event time for the buy events 
will cause an incorrect model. If you use SDK, the current time is used as 
event time by default.</p><div class="alert-message warning"><p>In particular, 
make sure correct event time is specified if you import data in batch (i.e. not 
in real time). If the event time is omitted, the SDK will use <strong>current 
time</strong> as event time which 
 is not the actual time of the buy event in this case!</p></div> <p>You can 
send these events to PredictionIO Event Server in real-time easily by making a 
HTTP request or through the provided SDK. Please see <a 
href="/appintegration/">App Integration Overview</a> for more details how to 
integrate your app with SDK.</p><p>Let&#39;s try sending events to EventServer 
with the following <code>curl</code> commands (The corresponding SDK code is 
showed in other tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the 
Access Key generated in above steps. Note that <code>localhost:7070</code> is 
the default URL of the Event Server.</p><p>For convenience, set your access key 
to the shell variable, run:</p><p><code>$ 
ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a href="#"></a></p> <p>When an 
user u0 buys item i0 on time <code>2014-11-02T09:39:45.618-08:00</code> 
(current time will be used if eventTime is not specified), you can send a buy 
event. Run the following <code>curl</code> command:
 </p><div class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-b0de0ecb-b63f-4882-8756-92eff46b62d4">REST API</a></li> <li 
data-lang="python"><a href="#tab-92ea047d-2601-4c98-aea3-1ccee93da75d">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-68144cd1-1fa4-4baa-851f-dbabdf613985">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-8c266b16-2e5d-4ff3-a62f-f458c1d9094c">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-b68a231b-3aff-4df4-9499-603fe6adc7c1">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-b0de0ecb-b63f-4882-8756-92eff46b62d4"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -51,7 +51,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-957df331-8f9a-41b2-89f8-0ee28cc4ec23"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-92ea047d-2601-4c98-aea3-1ccee93da75d"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -104,7 +104,7 @@ Your system is all ready to go.
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span><span 
class="p">,</span>
   <span class="n">event_time</span><span class="o">=&lt;</span><span 
class="n">EVENT_TIME</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-1bd6b063-d555-44c4-b160-b5521ccd314d"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-68144cd1-1fa4-4baa-851f-dbabdf613985"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -155,7 +155,7 @@ Your system is all ready to go.
 <span class="p">));</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-0c6e8b74-4f39-4316-bb2b-7d963815a2d7"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-8c266b16-2e5d-4ff3-a62f-f458c1d9094c"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -200,7 +200,7 @@ Your system is all ready to go.
     <span class="s1">'eventTime'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="no">EVENT_TIME</span><span 
class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-1e0a015e-e1ab-458b-b3fc-73a98ffdcdb4"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-b68a231b-3aff-4df4-9499-603fe6adc7c1"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -290,7 +290,7 @@ User u10 buys item s2i1 at 2014-10-19 15:43:15.618000-07:53
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed 
successfully and running, you should see a console message similar to the 
following:</p><div class="highlight shell"><table style="border-spacing: 
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span 
class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind 
successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can query the engine. 
For example, return top 3 items which are frequently bought with item 
&quot;s2i1&quot;. You can sending this JSON &#39;{ &quot;items&quot; : 
[&quot;s2i1&quot;], &quot;num&quot; : 3 }&#39; to the deployed engine. The 
engine will return a JSON with the recommended items.</p><p>If you include one 
or more items in the query, the engine will use each combination of the query 
items as condition, and return recommended items if there is any for this 
condition. For example, if you query items are [&quot;A&quot;, &quot;B&q
 uot;], then the engine will use [&quot;A&quot;], [&quot;B&quot;], and 
[&quot;A&quot;, &quot;B&quot;] as condition and try to find top n recommended 
items for each combination.</p><p>You can simply send a query by making a HTTP 
request or through the <code>EngineClient</code> of an SDK.</p><p>With the 
deployed engine running, open another terminal and run the following 
<code>curl</code> command or use SDK to send the query:</p><div class="tabs"> 
<ul class="control"> <li data-lang="json"><a 
href="#tab-a8218892-f1e3-4ee2-8dee-8047dad8a432">REST API</a></li> <li 
data-lang="python"><a href="#tab-96675bc5-9eed-4051-9a64-893629947193">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-198320f6-f0a6-4cca-bdab-9650aa203052">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-9524733d-636f-4e99-aaa5-8a03e23c962b">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-7f5baa1d-4628-48fc-8e67-24353224c308">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" id="tab-a8218892-f1e3-
 4ee2-8dee-8047dad8a432"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can query the engine. 
For example, return top 3 items which are frequently bought with item 
&quot;s2i1&quot;. You can sending this JSON &#39;{ &quot;items&quot; : 
[&quot;s2i1&quot;], &quot;num&quot; : 3 }&#39; to the deployed engine. The 
engine will return a JSON with the recommended items.</p><p>If you include one 
or more items in the query, the engine will use each combination of the query 
items as condition, and return recommended items if there is any for this 
condition. For example, if you query items are [&quot;A&quot;, &quot;B&q
 uot;], then the engine will use [&quot;A&quot;], [&quot;B&quot;], and 
[&quot;A&quot;, &quot;B&quot;] as condition and try to find top n recommended 
items for each combination.</p><p>You can simply send a query by making a HTTP 
request or through the <code>EngineClient</code> of an SDK.</p><p>With the 
deployed engine running, open another terminal and run the following 
<code>curl</code> command or use SDK to send the query:</p><div class="tabs"> 
<ul class="control"> <li data-lang="json"><a 
href="#tab-c1b3ef86-5920-448f-a234-fdf1f473104d">REST API</a></li> <li 
data-lang="python"><a href="#tab-1702d0a5-8c19-4ca4-a7d7-108933d9a2e5">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-215e8f7a-1181-42ab-8a21-bf769ef40085">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-ad6cc690-1a5e-47ad-9448-bce03ef39ae6">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-f10bbb5f-a735-4b6f-9d3c-a723c297952d">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" id="tab-c1b3ef86-5920-
 448f-a234-fdf1f473104d"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
 2
 3
 4
@@ -303,7 +303,7 @@ User u10 buys item s2i1 at 2014-10-19 15:43:15.618000-07:53
 }'</span> <span class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-96675bc5-9eed-4051-9a64-893629947193"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-1702d0a5-8c19-4ca4-a7d7-108933d9a2e5"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -314,7 +314,7 @@ http://localhost:8000/queries.json
   <span class="s">"items"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"s2i1"</span><span class="p">],</span>
   <span class="s">"num"</span> <span class="p">:</span> <span 
class="mi">3</span>
 <span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-198320f6-f0a6-4cca-bdab-9650aa203052"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-215e8f7a-1181-42ab-8a21-bf769ef40085"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -341,7 +341,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span 
class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-9524733d-636f-4e99-aaa5-8a03e23c962b"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-ad6cc690-1a5e-47ad-9448-bce03ef39ae6"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -360,7 +360,7 @@ http://localhost:8000/queries.json
 <span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-7f5baa1d-4628-48fc-8e67-24353224c308"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-f10bbb5f-a735-4b6f-9d3c-a723c297952d"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/fef1e81c/templates/ecommercerecommendation/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/quickstart/index.html 
b/templates/ecommercerecommendation/quickstart/index.html
index 69e0cf3..25ce6eb 100644
--- a/templates/ecommercerecommendation/quickstart/index.html
+++ b/templates/ecommercerecommendation/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp1 |    1 | 
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp2 |    2 | 
io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span 
class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, the E-Commerce 
Recommendation Engine Template supports 2 types of entities and 2 events: 
<strong>user</strong> and <strong>item</strong>; events <strong>view</strong> 
and <strong>buy</strong>. An item has the <strong>categories</strong> property, 
which is a list of category names (String). A user can view and buy an item. 
The special <strong>constraint</strong> entity with entityId 
<strong>unavailableItems</strong> defines a list of unavailable items and is 
taken into account in realtime during serving.</p><p>In summary, this template 
requires &#39;$set&#39; user event, &#39;$set&#39; item event, user-view-item 
events, user-buy-item event and &#39;$set&#39; constraint event.</p><div 
class="alert-message info"><p>This template can easily be customized to 
consider other user-to-it
 em events.</p></div> <p>You can send these events to PredictionIO Event Server 
in real-time easily by making a HTTP request or through the provided SDK. 
Please see <a href="/appintegration/">App Integration Overview</a> for more 
details how to integrate your app with SDK.</p><p>Let&#39;s try sending events 
to EventServer with the following <code>curl</code> commands (The corresponding 
SDK code is showed in other tabs).</p><p>Replace 
<code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. 
Note that <code>localhost:7070</code> is the default URL of the Event 
Server.</p><p>For convenience, set your access key to the shell variable, 
run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a 
href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is 
created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current 
time will be used if eventTime is not specified), you can send a 
<code>$set</code> event for this user. To send this 
 event, run the following <code>curl</code> command:</p><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-2234856c-c0e7-41d7-9c0a-b3551b08c6a4">REST API</a></li> <li 
data-lang="python"><a href="#tab-b8565386-cd59-46e4-83f1-3d228091d183">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-f68458eb-13d6-45e6-ad06-0d49306651cc">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-1d60e63e-07cd-4ba7-97bf-9d9122b25fe5">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-3c041cc4-5206-471b-b03d-17e20f3c2c3a">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-2234856c-c0e7-41d7-9c0a-b3551b08c6a4"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, the E-Commerce 
Recommendation Engine Template supports 2 types of entities and 2 events: 
<strong>user</strong> and <strong>item</strong>; events <strong>view</strong> 
and <strong>buy</strong>. An item has the <strong>categories</strong> property, 
which is a list of category names (String). A user can view and buy an item. 
The special <strong>constraint</strong> entity with entityId 
<strong>unavailableItems</strong> defines a list of unavailable items and is 
taken into account in realtime during serving.</p><p>In summary, this template 
requires &#39;$set&#39; user event, &#39;$set&#39; item event, user-view-item 
events, user-buy-item event and &#39;$set&#39; constraint event.</p><div 
class="alert-message info"><p>This template can easily be customized to 
consider other user-to-it
 em events.</p></div> <p>You can send these events to PredictionIO Event Server 
in real-time easily by making a HTTP request or through the provided SDK. 
Please see <a href="/appintegration/">App Integration Overview</a> for more 
details how to integrate your app with SDK.</p><p>Let&#39;s try sending events 
to EventServer with the following <code>curl</code> commands (The corresponding 
SDK code is showed in other tabs).</p><p>Replace 
<code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. 
Note that <code>localhost:7070</code> is the default URL of the Event 
Server.</p><p>For convenience, set your access key to the shell variable, 
run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a 
href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is 
created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current 
time will be used if eventTime is not specified), you can send a 
<code>$set</code> event for this user. To send this 
 event, run the following <code>curl</code> command:</p><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-1c129b7c-0a50-4e6b-a3e1-258da4e706a1">REST API</a></li> <li 
data-lang="python"><a href="#tab-c2de881e-8b16-4f6d-94e3-49e2ab638ab1">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-12be6901-c20b-420c-aea4-c9fb558a8bda">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-28833238-ef01-4453-8eb0-21294d290e17">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-2571bb9a-763a-428d-80f6-21e53292831f">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-1c129b7c-0a50-4e6b-a3e1-258da4e706a1"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -47,7 +47,7 @@ Your system is all ready to go.
   "entityId" : "u0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-b8565386-cd59-46e4-83f1-3d228091d183"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-c2de881e-8b16-4f6d-94e3-49e2ab638ab1"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -78,7 +78,7 @@ Your system is all ready to go.
   <span class="n">entity_type</span><span class="o">=</span><span 
class="s">"user"</span><span class="p">,</span>
   <span class="n">entity_id</span><span class="o">=&lt;</span><span 
class="n">USER_ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-f68458eb-13d6-45e6-ad06-0d49306651cc"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-12be6901-c20b-420c-aea4-c9fb558a8bda"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -119,7 +119,7 @@ Your system is all ready to go.
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'categories'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'&lt;CATEGORY_1&gt;'</span><span class="p">,</span> <span 
class="s1">'&lt;CATEGORY_2&gt;'</span><span class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-1d60e63e-07cd-4ba7-97bf-9d9122b25fe5"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-28833238-ef01-4453-8eb0-21294d290e17"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -136,7 +136,7 @@ Your system is all ready to go.
   <span class="s1">'user'</span><span class="p">,</span>
   <span class="o">&lt;</span><span class="no">USER</span> <span 
class="no">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-3c041cc4-5206-471b-b03d-17e20f3c2c3a"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-2571bb9a-763a-428d-80f6-21e53292831f"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -161,7 +161,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityType</span><span 
class="o">(</span><span class="s">"user"</span><span class="o">)</span>
   <span class="o">.</span><span class="na">entityId</span><span 
class="o">(&lt;</span><span class="n">USER_ID</span><span 
class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">userEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item 
&quot;i0&quot; is created in your app on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a <code>$set</code> event for the 
item. Note that the item is set with categories properties: 
<code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-059e999b-3113-460c-8f87-2de7e43438d0">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-bd902b69-b208-4339-9c4a-4d9b11f2c1c2">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-d4a93e04-043d-4c8e-a520-1e845860a3b3">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-51fa37f1-bfce-4d46-8858-e864469a7833">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-8aa2dc9a-33f2-4e16-ba74-838983e2e870">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-059e99
 9b-3113-460c-8f87-2de7e43438d0"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item 
&quot;i0&quot; is created in your app on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a <code>$set</code> event for the 
item. Note that the item is set with categories properties: 
<code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-3a7d869c-32d3-4acc-8b36-062b6837fa40">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-47a1e3ff-40a1-4ff2-bbb7-ad7e9300962c">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-73304bd1-728c-47d5-92b0-4fb1c2e79475">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-85f92b78-90c2-44ff-8912-fc2fd7f4bf40">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-c0821cf8-ee27-4d77-b070-78f203d96325">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-3a7d86
 9c-32d3-4acc-8b36-062b6837fa40"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
 2
 3
 4
@@ -182,7 +182,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-bd902b69-b208-4339-9c4a-4d9b11f2c1c2"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-47a1e3ff-40a1-4ff2-bbb7-ad7e9300962c"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -201,7 +201,7 @@ Your system is all ready to go.
     <span class="s">"categories"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"&lt;CATEGORY_1&gt;"</span><span 
class="p">,</span> <span class="s">"&lt;CATEGORY_2&gt;"</span><span 
class="p">]</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-d4a93e04-043d-4c8e-a520-1e845860a3b3"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-73304bd1-728c-47d5-92b0-4fb1c2e79475"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -218,7 +218,7 @@ Your system is all ready to go.
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'categories'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'&lt;CATEGORY_1&gt;'</span><span class="p">,</span> <span 
class="s1">'&lt;CATEGORY_2&gt;'</span><span class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-51fa37f1-bfce-4d46-8858-e864469a7833"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-85f92b78-90c2-44ff-8912-fc2fd7f4bf40"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -235,7 +235,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-8aa2dc9a-33f2-4e16-ba74-838983e2e870"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-c0821cf8-ee27-4d77-b070-78f203d96325"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -248,7 +248,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityId</span><span 
class="o">(&lt;</span><span class="n">ITEM_ID</span><span class="o">&gt;)</span>
   <span class="o">.</span><span class="na">property</span><span 
class="o">(</span><span class="s">"categories"</span><span class="o">,</span> 
<span class="n">ImmutableList</span><span class="o">.</span><span 
class="na">of</span><span class="o">(</span><span 
class="s">"&lt;CATEGORY_1&gt;"</span><span class="o">,</span> <span 
class="s">"&lt;CATEGORY_2&gt;"</span><span class="o">));</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">itemEvent</span><span class="o">)</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>The properties of 
the <code>user</code> and <code>item</code> can be set, unset, or delete by 
special events <strong>$set</strong>, <strong>$unset</strong> and 
<strong>$delete</strong>. Please refer to <a 
href="/datacollection/eventapi/#note-about-properties">Event API</a> for more 
details of using these events.</p><p>When the user &quot;u0&quot; view item 
&quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time 
will be used if eventTime is not specified), you can send a view event. Run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-f5852d40-6e27-4976-9e37-7f483c4f3914">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-317b3d1d-3893-414b-b4da-a41d5f4dde34">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-c76f9d9f-b0dc-4c1d-91f6-9e8d86ed0558">PHP 
SDK</a></li> <li data-lang="ruby"><a href="#tab-3a2ee6e4-adfb-4fc7-9448-f8d1d9
 ccd6f2">Ruby SDK</a></li> <li data-lang="java"><a 
href="#tab-784b3a7d-25b1-4010-a67a-c3e44a53659f">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-f5852d40-6e27-4976-9e37-7f483c4f3914"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>The properties of 
the <code>user</code> and <code>item</code> can be set, unset, or delete by 
special events <strong>$set</strong>, <strong>$unset</strong> and 
<strong>$delete</strong>. Please refer to <a 
href="/datacollection/eventapi/#note-about-properties">Event API</a> for more 
details of using these events.</p><p>When the user &quot;u0&quot; view item 
&quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time 
will be used if eventTime is not specified), you can send a view event. Run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-5a8de107-4368-4a50-ad29-a6b9278a2139">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-114b2fbb-3249-499a-8efa-a18effab2650">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-36375088-08b5-412b-8a62-0bbe3c6bfe06">PHP 
SDK</a></li> <li data-lang="ruby"><a href="#tab-bb188a08-f0ae-4584-bd35-354ea1
 2a09a2">Ruby SDK</a></li> <li data-lang="java"><a 
href="#tab-01c0905d-8d86-495f-b231-d088c96cc78c">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-5a8de107-4368-4a50-ad29-a6b9278a2139"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -267,7 +267,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T12:34:56.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-317b3d1d-3893-414b-b4da-a41d5f4dde34"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-114b2fbb-3249-499a-8efa-a18effab2650"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -284,7 +284,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span 
class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-c76f9d9f-b0dc-4c1d-91f6-9e8d86ed0558"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-36375088-08b5-412b-8a62-0bbe3c6bfe06"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -303,7 +303,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="nx">ITEM</span> <span 
class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-3a2ee6e4-adfb-4fc7-9448-f8d1d9ccd6f2"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-bb188a08-f0ae-4584-bd35-354ea12a09a2"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -322,7 +322,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-784b3a7d-25b1-4010-a67a-c3e44a53659f"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-01c0905d-8d86-495f-b231-d088c96cc78c"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -337,7 +337,7 @@ Your system is all ready to go.
     <span class="o">.</span><span class="na">targetEntityType</span><span 
class="o">(</span><span class="s">"item"</span><span class="o">)</span>
     <span class="o">.</span><span class="na">targetEntityId</span><span 
class="o">(&lt;</span><span class="n">ITEM_ID</span><span 
class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">viewEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user 
&quot;u0&quot; buy item &quot;i0&quot; on time 
<code>2014-11-10T13:00:00.123-08:00</code> (current time will be used if 
eventTime is not specified), you can send a view event. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-db9d7b75-3cbb-4a38-a00d-74cbfafe5537">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-21ea4117-a95e-4796-8e1c-1ae5222d5836">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-68028a7b-96a6-4077-bab9-d242093eb471">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-1ca2770e-93b7-4b37-8cc6-923b9f7e9060">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-463926e7-c2d7-4c0c-b714-8d18357e3241">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-db9d7b75-3cbb-4a38-a00d-74cbfafe5537"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-
 align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user 
&quot;u0&quot; buy item &quot;i0&quot; on time 
<code>2014-11-10T13:00:00.123-08:00</code> (current time will be used if 
eventTime is not specified), you can send a view event. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-f2f0de99-a572-4159-8c08-cac5015bc1e6">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-c24a410b-31c8-4857-a838-9e57a47e3e7a">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-843262fa-1658-4a0c-b487-0460088795d1">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-a0ea3235-e4c8-4693-a598-c4f674bb8644">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-8c5e0229-a265-4efe-854c-e27b32de8d05">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-f2f0de99-a572-4159-8c08-cac5015bc1e6"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-
 align: right"><pre class="lineno">1
 2
 3
 4
@@ -356,7 +356,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T13:00:00.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-21ea4117-a95e-4796-8e1c-1ae5222d5836"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-c24a410b-31c8-4857-a838-9e57a47e3e7a"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -373,7 +373,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span 
class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-68028a7b-96a6-4077-bab9-d242093eb471"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-843262fa-1658-4a0c-b487-0460088795d1"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -392,7 +392,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="nx">ITEM</span> <span 
class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-1ca2770e-93b7-4b37-8cc6-923b9f7e9060"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-a0ea3235-e4c8-4693-a598-c4f674bb8644"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -409,7 +409,7 @@ Your system is all ready to go.
     <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> 
<span class="o">&lt;</span><span class="no">ITEM</span> <span 
class="no">ID</span><span class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-463926e7-c2d7-4c0c-b714-8d18357e3241"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-8c5e0229-a265-4efe-854c-e27b32de8d05"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -490,19 +490,19 @@ User u10 buys item i40
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed 
successfully and running, you should see a console message similar to the 
following:</p><div class="highlight shell"><table style="border-spacing: 
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span 
class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind 
successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted 
results. To recommend 4 items to user ID &quot;u1&quot;. You send this JSON 
<code>{ &quot;user&quot;: &quot;u1&quot;, &quot;num&quot;: 4 }</code> to the 
deployed engine and it will return a JSON of the recommended items. Simply send 
a query by making a HTTP request or through the <code>EngineClient</code> of an 
SDK.</p><p>With the deployed engine running, open another terminal and run the 
following <code>curl</code> command or use SDK to send the query:</p><div 
class="tabs"> <ul class="control"> <li data-lang="js
 on"><a href="#tab-e030bdf3-eefc-467f-a1d0-a43c1ac95431">REST API</a></li> <li 
data-lang="python"><a href="#tab-62af836d-ce35-4c00-97ee-b95d56504bae">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-95d9f80a-a01a-4480-be72-cf98e338a987">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-41fd4ef0-ef58-480d-880d-ccca85cb6e53">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-0ed737bc-4545-4cea-a6a2-1eecf8394ddc">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-e030bdf3-eefc-467f-a1d0-a43c1ac95431"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted 
results. To recommend 4 items to user ID &quot;u1&quot;. You send this JSON 
<code>{ &quot;user&quot;: &quot;u1&quot;, &quot;num&quot;: 4 }</code> to the 
deployed engine and it will return a JSON of the recommended items. Simply send 
a query by making a HTTP request or through the <code>EngineClient</code> of an 
SDK.</p><p>With the deployed engine running, open another terminal and run the 
following <code>curl</code> command or use SDK to send the query:</p><div 
class="tabs"> <ul class="control"> <li data-lang="js
 on"><a href="#tab-e5ee94b6-feb0-4d19-a776-f3cf5963eb35">REST API</a></li> <li 
data-lang="python"><a href="#tab-8db3d2cf-a40c-4dbb-b489-7f1c920fa14f">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-6cafc5d8-1eb4-4021-9c99-e70546af4ea9">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-1c245e58-874a-4b72-83f8-f11bcec1cd9f">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-eeee7fde-3a9b-4a95-a9ce-9ce17b87c77c">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-e5ee94b6-feb0-4d19-a776-f3cf5963eb35"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span 
class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "user": "u1", "num": 4 }'</span> <span 
class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-62af836d-ce35-4c00-97ee-b95d56504bae"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-8db3d2cf-a40c-4dbb-b489-7f1c920fa14f"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span 
class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span 
class="n">predictionio</span><span class="o">.</span><span 
class="n">EngineClient</span><span class="p">(</span><span 
class="n">url</span><span class="o">=</span><span 
class="s">"http://localhost:8000";</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span 
class="o">.</span><span class="n">send_query</span><span 
class="p">({</span><span class="s">"user"</span><span class="p">:</span> <span 
class="s">"u1"</span><span class="p">,</span> <span class="s">"num"</span><span 
class="p">:</span> <span class="mi">4</span><span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-95d9f80a-a01a-4480-be72-cf98e338a987"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-6cafc5d8-1eb4-4021-9c99-e70546af4ea9"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -521,7 +521,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span 
class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-41fd4ef0-ef58-480d-880d-ccca85cb6e53"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-1c245e58-874a-4b72-83f8-f11bcec1cd9f"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -534,7 +534,7 @@ http://localhost:8000/queries.json
 <span class="n">response</span> <span class="o">=</span> <span 
class="n">client</span><span class="p">.</span><span 
class="nf">send_query</span><span class="p">(</span><span 
class="s1">'user'</span> <span class="o">=&gt;</span> <span 
class="s1">'i1'</span><span class="p">,</span> <span class="s1">'num'</span> 
<span class="o">=&gt;</span> <span class="mi">4</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-0ed737bc-4545-4cea-a6a2-1eecf8394ddc"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-eeee7fde-3a9b-4a95-a9ce-9ce17b87c77c"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -578,7 +578,7 @@ http://localhost:8000/queries.json
     <span class="o">{</span><span class="s2">"item"</span>:<span 
class="s2">"i3"</span>,<span 
class="s2">"score"</span>:0.003007015026561692<span class="o">}</span>
   <span class="o">]</span>
 <span class="o">}</span>
-</pre></td></tr></tbody></table> </div> <p><em>MyECommerceRecommendation</em> 
is now running.</p> <div class="alert-message info"><p>To update the model 
periodically with new data, simply set up a cron job to call <code>pio 
train</code> and <code>pio deploy</code>. The engine will continue to serve 
prediction results during the re-train process. After the training is 
completed, <code>pio deploy</code> will automatically shutdown the existing 
engine server and bring up a new process on the same port.</p></div><div 
class="alert-message info"><p><strong>Note that if you import a <em>large</em> 
data set</strong> and the training seems to be taking forever or getting stuck, 
it&#39;s likely that there is not enough executor memory. It&#39;s recommended 
to setup a Spark standalone cluster, you&#39;ll need to specify more driver and 
executor memory when training with a large data set. Please see <a 
href="/resources/faq/#engine-training">FAQ here</a> for instructions.</p></div> 
<h2 id='setti
 ng-constraint-&quot;unavailableitems&quot;' class='header-anchors'>Setting 
constraint &quot;unavailableItems&quot;</h2><p>Now let&#39;s send a item 
contraint &quot;unavailableItems&quot; (replace accessKey with your Access 
Key):</p><div class="alert-message note"><p>You can also use SDK to send this 
event as described in the SDK sample above.</p></div><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-8ee2fe6f-4042-4d6d-952b-e507a4245294">REST API</a></li> <li 
data-lang="python"><a href="#tab-4d6ef27a-e75e-4444-a6cb-8082f664ff24">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-1046d39f-647a-4e2b-b103-61ea026cbb54">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-d05ee0bf-1f2e-4da0-9faf-213d3c5accfd">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-2c4533dd-94c1-4503-b926-7b74e510215e">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-8ee2fe6f-4042-4d6d-952b-e507a4245294"> <div class="highlight shell"> 
<table style="border-
 spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><em>MyECommerceRecommendation</em> 
is now running.</p> <div class="alert-message info"><p>To update the model 
periodically with new data, simply set up a cron job to call <code>pio 
train</code> and <code>pio deploy</code>. The engine will continue to serve 
prediction results during the re-train process. After the training is 
completed, <code>pio deploy</code> will automatically shutdown the existing 
engine server and bring up a new process on the same port.</p></div><div 
class="alert-message info"><p><strong>Note that if you import a <em>large</em> 
data set</strong> and the training seems to be taking forever or getting stuck, 
it&#39;s likely that there is not enough executor memory. It&#39;s recommended 
to setup a Spark standalone cluster, you&#39;ll need to specify more driver and 
executor memory when training with a large data set. Please see <a 
href="/resources/faq/#engine-training">FAQ here</a> for instructions.</p></div> 
<h2 id='setti
 ng-constraint-&quot;unavailableitems&quot;' class='header-anchors'>Setting 
constraint &quot;unavailableItems&quot;</h2><p>Now let&#39;s send a item 
contraint &quot;unavailableItems&quot; (replace accessKey with your Access 
Key):</p><div class="alert-message note"><p>You can also use SDK to send this 
event as described in the SDK sample above.</p></div><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-4ca0c136-a501-46b8-86ac-63065436e4ee">REST API</a></li> <li 
data-lang="python"><a href="#tab-fbf3efd5-cc39-4c1f-b398-cad91d4e909a">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-d768505f-4464-4eee-9ce0-3140c1da07a7">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-2221381b-c6af-46a7-905a-359d79202aff">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-1a8a80ca-a445-40c4-8f01-5ad313bd03b7">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-4ca0c136-a501-46b8-86ac-63065436e4ee"> <div class="highlight shell"> 
<table style="border-
 spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2
 3
 4
@@ -599,7 +599,7 @@ http://localhost:8000/queries.json
   }
   "eventTime" : "2015-02-17T02:11:21.934Z"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-4d6ef27a-e75e-4444-a6cb-8082f664ff24"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-fbf3efd5-cc39-4c1f-b398-cad91d4e909a"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -618,7 +618,7 @@ http://localhost:8000/queries.json
     <span class="s">"items"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"&lt;ITEM ID1&gt;"</span><span 
class="p">,</span> <span class="s">"&lt;ITEM ID2&gt;"</span><span 
class="p">]</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-1046d39f-647a-4e2b-b103-61ea026cbb54"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-d768505f-4464-4eee-9ce0-3140c1da07a7"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -635,7 +635,7 @@ http://localhost:8000/queries.json
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span class="s1">'items'</span> 
<span class="o">=&gt;</span> <span class="k">array</span><span 
class="p">(</span><span class="s1">'&lt;ITEM ID1&gt;'</span><span 
class="p">,</span> <span class="s1">'&lt;ITEM ID2&gt;'</span><span 
class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-d05ee0bf-1f2e-4da0-9faf-213d3c5accfd"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-2221381b-c6af-46a7-905a-359d79202aff"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -650,7 +650,7 @@ http://localhost:8000/queries.json
     <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="p">{</span> <span class="s1">'items'</span> <span class="o">=&gt;</span> 
<span class="p">[</span><span class="s1">'&lt;ITEM ID1&gt;'</span><span 
class="p">,</span> <span class="s1">'&lt;ITEM ID2&gt;'</span><span 
class="p">]</span> <span class="p">}</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-2c4533dd-94c1-4503-b926-7b74e510215e"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-1a8a80ca-a445-40c4-8f01-5ad313bd03b7"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

Reply via email to