http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/c17b9607/templates/ecommercerecommendation/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/quickstart/index.html
b/templates/ecommercerecommendation/quickstart/index.html
index 72590a9..bc39a03 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'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 specical <strong>constraint</strong> entiy 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 '$set' user event, '$set' item event, user-view-item
events, user-buy-item event and '$set' 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'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><ACCCESS_KEY></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=<ACCESS_KEY></code></p> <p><a
href="#"></a></p> <p>For example, when a new user with id "u0" 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-6ebc6c8c-a995-4ef3-83f8-85cbbf14db3c">REST API</a></li> <li
data-lang="python"><a href="#tab-e36d5bdc-5170-45f3-b0cc-cbb7341355a3">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-492e5a88-3b54-422b-862f-fdd92ed0c6a1">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-2c1c5f6f-b8b5-498c-bc98-2359ef5a308d">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-d9ce4d0b-228c-4bd2-96ed-8fb6586f8f75">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-6ebc6c8c-a995-4ef3-83f8-85cbbf14db3c"> <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'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 specical <strong>constraint</strong> entiy 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 '$set' user event, '$set' item event, user-view-item
events, user-buy-item event and '$set' 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'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><ACCCESS_KEY></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=<ACCESS_KEY></code></p> <p><a
href="#"></a></p> <p>For example, when a new user with id "u0" 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-48a5c936-e241-40fa-8670-06b7e6840391">REST API</a></li> <li
data-lang="python"><a href="#tab-ccf88bf2-db0a-42da-985a-a6f2d162892a">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-f3d9240a-d683-41c9-a6de-369a0e986a5b">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-de7e4cfc-1afb-4916-b216-62a376a3781e">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-f225309a-19b9-449e-b9cd-5a761b96afb8">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-48a5c936-e241-40fa-8670-06b7e6840391"> <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-e36d5bdc-5170-45f3-b0cc-cbb7341355a3"> <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-ccf88bf2-db0a-42da-985a-a6f2d162892a"> <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">=<</span><span
class="n">USER_ID</span><span class="o">></span>
<span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK"
data-lang="php" id="tab-492e5a88-3b54-422b-862f-fdd92ed0c6a1"> <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-f3d9240a-d683-41c9-a6de-369a0e986a5b"> <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">=></span> <span
class="k">array</span><span class="p">(</span><span
class="s1">'categories'</span> <span class="o">=></span> <span
class="k">array</span><span class="p">(</span><span
class="s1">'<CATEGORY_1>'</span><span class="p">,</span> <span
class="s1">'<CATEGORY_2>'</span><span class="p">))</span>
<span class="p">));</span>
<span class="cp">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-2c1c5f6f-b8b5-498c-bc98-2359ef5a308d"> <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-de7e4cfc-1afb-4916-b216-62a376a3781e"> <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"><</span><span class="no">USER</span> <span
class="no">ID</span><span class="o">></span>
<span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK"
data-lang="java" id="tab-d9ce4d0b-228c-4bd2-96ed-8fb6586f8f75"> <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-f225309a-19b9-449e-b9cd-5a761b96afb8"> <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">(<</span><span class="n">USER_ID</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">userEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item
"i0" 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>"c1"</code> and <code>"c2"</code>. Run the following
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li
data-lang="json"><a href="#tab-b63558bd-7dc7-4c5c-9c93-f12a7a506932">REST
API</a></li> <li data-lang="python"><a
href="#tab-19ceeae6-fe4f-4e7e-9a08-fc5c9d8591ca">Python SDK</a></li> <li
data-lang="php"><a href="#tab-7e8617df-a8b6-4a06-bfd3-4463739a0e96">PHP
SDK</a></li> <li data-lang="ruby"><a
href="#tab-12d513ac-1678-49a5-a830-a1f993b854d8">Ruby SDK</a></li> <li
data-lang="java"><a href="#tab-c1ff9692-320d-4963-8208-94272c108744">Java
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-b63558
bd-7dc7-4c5c-9c93-f12a7a506932"> <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
"i0" 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>"c1"</code> and <code>"c2"</code>. Run the following
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li
data-lang="json"><a href="#tab-86e33a31-4dc4-49b1-8195-964ddb353676">REST
API</a></li> <li data-lang="python"><a
href="#tab-ae23f86e-bc1b-4580-bdfc-9bc50f605e98">Python SDK</a></li> <li
data-lang="php"><a href="#tab-f49d409f-0fcd-4ff6-a27b-b5d4d6905b30">PHP
SDK</a></li> <li data-lang="ruby"><a
href="#tab-dc7049cc-f97b-4972-a9e5-020aaa1aa5e2">Ruby SDK</a></li> <li
data-lang="java"><a href="#tab-56bb4264-65c9-4044-9984-b52cbf8060ae">Java
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-86e33a
31-4dc4-49b1-8195-964ddb353676"> <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-19ceeae6-fe4f-4e7e-9a08-fc5c9d8591ca"> <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-ae23f86e-bc1b-4580-bdfc-9bc50f605e98"> <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">"<CATEGORY_1>"</span><span
class="p">,</span> <span class="s">"<CATEGORY_2>"</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-7e8617df-a8b6-4a06-bfd3-4463739a0e96"> <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-f49d409f-0fcd-4ff6-a27b-b5d4d6905b30"> <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">=></span> <span
class="k">array</span><span class="p">(</span><span
class="s1">'categories'</span> <span class="o">=></span> <span
class="k">array</span><span class="p">(</span><span
class="s1">'<CATEGORY_1>'</span><span class="p">,</span> <span
class="s1">'<CATEGORY_2>'</span><span class="p">))</span>
<span class="p">));</span>
<span class="cp">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-12d513ac-1678-49a5-a830-a1f993b854d8"> <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-dc7049cc-f97b-4972-a9e5-020aaa1aa5e2"> <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-c1ff9692-320d-4963-8208-94272c108744"> <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-56bb4264-65c9-4044-9984-b52cbf8060ae"> <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">(<</span><span class="n">ITEM_ID</span><span class="o">>)</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">"<CATEGORY_1>"</span><span class="o">,</span> <span
class="s">"<CATEGORY_2>"</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 "u0" view item
"i0" 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-c795f672-245e-4f93-a095-69a4511328fd">REST
API</a></li> <li data-lang="python"><a
href="#tab-89a3cbea-8cf8-489f-9fad-42e65c3a8df9">Python SDK</a></li> <li
data-lang="php"><a href="#tab-3aad6678-55a2-4b10-b767-d5f85d728a18">PHP
SDK</a></li> <li data-lang="ruby"><a href="#tab-3bcda33f-c1c4-4013-9ac5-9c3251
0a327f">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-c376b09b-a333-4da9-9174-f62f4287f95e">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-c795f672-245e-4f93-a095-69a4511328fd"> <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 "u0" view item
"i0" 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-294c869f-35da-4543-9444-a2a88e3cd01c">REST
API</a></li> <li data-lang="python"><a
href="#tab-a1eee7be-386f-464a-9164-57632cdb1bea">Python SDK</a></li> <li
data-lang="php"><a href="#tab-ba8f791f-2721-482f-895e-740987ff45a4">PHP
SDK</a></li> <li data-lang="ruby"><a href="#tab-b5f045db-4316-49aa-af6e-8bbdea
22962f">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-cffcbcd1-724b-41c7-a802-ff43e75c79fa">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-294c869f-35da-4543-9444-a2a88e3cd01c"> <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-89a3cbea-8cf8-489f-9fad-42e65c3a8df9"> <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-a1eee7be-386f-464a-9164-57632cdb1bea"> <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">=<</span><span
class="n">ITEM</span> <span class="n">ID</span><span class="o">></span>
<span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK"
data-lang="php" id="tab-3aad6678-55a2-4b10-b767-d5f85d728a18"> <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-ba8f791f-2721-482f-895e-740987ff45a4"> <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">=></span> <span
class="o"><</span><span class="nx">ITEM</span> <span
class="nx">ID</span><span class="o">></span>
<span class="p">));</span>
<span class="cp">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-3bcda33f-c1c4-4013-9ac5-9c32510a327f"> <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-b5f045db-4316-49aa-af6e-8bbdea22962f"> <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-c376b09b-a333-4da9-9174-f62f4287f95e"> <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-cffcbcd1-724b-41c7-a802-ff43e75c79fa"> <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">(<</span><span class="n">ITEM_ID</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">viewEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user
"u0" buy item "i0" 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-ecbbe319-53d4-41d6-a975-dd5b80670b95">REST
API</a></li> <li data-lang="python"><a
href="#tab-5f324582-2df1-468e-9e93-a08fba953254">Python SDK</a></li> <li
data-lang="php"><a href="#tab-ac0e2034-dc6f-493b-820d-e747988c10d1">PHP
SDK</a></li> <li data-lang="ruby"><a
href="#tab-29a42ef2-9e4b-4f8b-a368-6d3d9e8e9eef">Ruby SDK</a></li> <li
data-lang="java"><a href="#tab-61c012e2-bcd2-471d-b319-61f002d7eb33">Java
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json"
id="tab-ecbbe319-53d4-41d6-a975-dd5b80670b95"> <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
"u0" buy item "i0" 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-6d3395f1-7e6d-441a-a9e0-e7c919b9c60d">REST
API</a></li> <li data-lang="python"><a
href="#tab-201b06b8-fdad-4a75-b8c9-5491542a77c3">Python SDK</a></li> <li
data-lang="php"><a href="#tab-24216576-69f9-4f64-a10a-1c8b4dc8a853">PHP
SDK</a></li> <li data-lang="ruby"><a
href="#tab-300632cb-c40e-44ce-9ea4-4240f979e5a0">Ruby SDK</a></li> <li
data-lang="java"><a href="#tab-d7eb97d0-4815-4f6f-a623-9c2e70279318">Java
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json"
id="tab-6d3395f1-7e6d-441a-a9e0-e7c919b9c60d"> <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-5f324582-2df1-468e-9e93-a08fba953254"> <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-201b06b8-fdad-4a75-b8c9-5491542a77c3"> <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">=<</span><span
class="n">ITEM</span> <span class="n">ID</span><span class="o">></span>
<span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK"
data-lang="php" id="tab-ac0e2034-dc6f-493b-820d-e747988c10d1"> <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-24216576-69f9-4f64-a10a-1c8b4dc8a853"> <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">=></span> <span
class="o"><</span><span class="nx">ITEM</span> <span
class="nx">ID</span><span class="o">></span>
<span class="p">));</span>
<span class="cp">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-29a42ef2-9e4b-4f8b-a368-6d3d9e8e9eef"> <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-300632cb-c40e-44ce-9ea4-4240f979e5a0"> <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">=></span>
<span class="o"><</span><span class="no">ITEM</span> <span
class="no">ID</span><span class="o">></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-61c012e2-bcd2-471d-b319-61f002d7eb33"> <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-d7eb97d0-4815-4f6f-a623-9c2e70279318"> <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 "u1". You send this JSON
<code>{ "user": "u1", "num": 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-d7379a41-9c7f-45e5-85e1-b36b3c8d7269">REST API</a></li> <li
data-lang="python"><a href="#tab-ca4a9678-52af-483b-ad26-f9b661833e48">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-b9dc0fb0-0a5f-4f40-bdfa-913b1825110e">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-34c0b87b-d3b2-4325-94eb-e78a11f128df">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-20e23839-b5a3-4b33-8ad9-dd53bded0edc">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-d7379a41-9c7f-45e5-85e1-b36b3c8d7269"> <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 "u1". You send this JSON
<code>{ "user": "u1", "num": 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-96e52f06-c833-434e-a05b-fde03019027f">REST API</a></li> <li
data-lang="python"><a href="#tab-3b424611-38fc-4c04-857e-2fdf9105b7a3">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-9546f2f7-e592-41a5-8d3e-f6752d509c4e">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-ebc177cd-6578-4e0c-b1ab-7ab6951cb1f1">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-28e399ce-bc4d-49dd-ad2a-83a955470b3d">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-96e52f06-c833-434e-a05b-fde03019027f"> <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-ca4a9678-52af-483b-ad26-f9b661833e48"> <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-3b424611-38fc-4c04-857e-2fdf9105b7a3"> <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-b9dc0fb0-0a5f-4f40-bdfa-913b1825110e"> <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-9546f2f7-e592-41a5-8d3e-f6752d509c4e"> <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">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-34c0b87b-d3b2-4325-94eb-e78a11f128df"> <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-ebc177cd-6578-4e0c-b1ab-7ab6951cb1f1"> <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">=></span> <span
class="s1">'i1'</span><span class="p">,</span> <span class="s1">'num'</span>
<span class="o">=></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-20e23839-b5a3-4b33-8ad9-dd53bded0edc"> <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-28e399ce-bc4d-49dd-ad2a-83a955470b3d"> <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's likely that there is not enough executor memory. It's recommended
to setup a Spark standalone cluster, you'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-"unavailableitems"' class='header-anchors'>Setting
constraint "unavailableItems"</h2><p>Now let's send a item
contraint "unavailableItems" (replace accessKey with your Access
Key):</p><div class="alert-message note"><p>You can also use SDK to send this
event as decribed in the SDK sample above.</p></div><div class="tabs"> <ul
class="control"> <li data-lang="json"><a
href="#tab-66a82dab-f37a-407f-b6cc-19b42bb1de30">REST API</a></li> <li
data-lang="python"><a href="#tab-756add3d-1483-4a0c-a396-c2ef5bfb40f1">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-fa94076b-47fd-4334-9c05-c32c9f3276f8">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-cc8b3ae4-f079-4a40-8c12-0bde0941e616">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-8865f3fd-4990-410e-86f9-744b0160a583">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-66a82dab-f37a-407f-b6cc-19b42bb1de30"> <div class="highlight shell">
<table style="border-s
pacing: 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's likely that there is not enough executor memory. It's recommended
to setup a Spark standalone cluster, you'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-"unavailableitems"' class='header-anchors'>Setting
constraint "unavailableItems"</h2><p>Now let's send a item
contraint "unavailableItems" (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-7a6798e1-1bcb-4444-b975-ae31351d9cfb">REST API</a></li> <li
data-lang="python"><a href="#tab-1e9624a2-04be-4c8c-a44f-9df44ef0961b">Python
SDK</a></li> <li data-lang="php"><a
href="#tab-0f7d86e1-4d8e-4037-bdc6-7caea97b6689">PHP SDK</a></li> <li
data-lang="ruby"><a href="#tab-45cd2f28-deb7-4a68-9292-d470adec52fe">Ruby
SDK</a></li> <li data-lang="java"><a
href="#tab-78716c2a-1ecb-43d9-a02b-e14443e7e5be">Java SDK</a></li> </ul> <div
data-tab="REST API" data-lang="json"
id="tab-7a6798e1-1bcb-4444-b975-ae31351d9cfb"> <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-756add3d-1483-4a0c-a396-c2ef5bfb40f1"> <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-1e9624a2-04be-4c8c-a44f-9df44ef0961b"> <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">"<ITEM ID1>"</span><span
class="p">,</span> <span class="s">"<ITEM ID2>"</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-fa94076b-47fd-4334-9c05-c32c9f3276f8"> <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-0f7d86e1-4d8e-4037-bdc6-7caea97b6689"> <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">=></span> <span
class="k">array</span><span class="p">(</span><span class="s1">'items'</span>
<span class="o">=></span> <span class="k">array</span><span
class="p">(</span><span class="s1">'<ITEM ID1>'</span><span
class="p">,</span> <span class="s1">'<ITEM ID2>'</span><span
class="p">))</span>
<span class="p">));</span>
<span class="cp">?></span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK"
data-lang="ruby" id="tab-cc8b3ae4-f079-4a40-8c12-0bde0941e616"> <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-45cd2f28-deb7-4a68-9292-d470adec52fe"> <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">=></span> <span
class="p">{</span> <span class="s1">'items'</span> <span class="o">=></span>
<span class="p">[</span><span class="s1">'<ITEM ID1>'</span><span
class="p">,</span> <span class="s1">'<ITEM ID2>'</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-8865f3fd-4990-410e-86f9-744b0160a583"> <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-78716c2a-1ecb-43d9-a02b-e14443e7e5be"> <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