| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| |
| <title>Class predictionio\EventClient | PredictionIO API PHP Client</title> |
| |
| <link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da"> |
| |
| </head> |
| |
| <body> |
| <div id="left"> |
| <div id="menu"> |
| <a href="index.html" title="Overview"><span>Overview</span></a> |
| |
| |
| <div id="groups"> |
| <h3>Namespaces</h3> |
| <ul> |
| <li class="active"> |
| <a href="namespace-predictionio.html"> |
| predictionio </a> |
| |
| </li> |
| </ul> |
| </div> |
| |
| <hr> |
| |
| |
| <div id="elements"> |
| <h3>Classes</h3> |
| <ul> |
| <li><a href="class-predictionio.BaseClient.html">BaseClient</a></li> |
| <li><a href="class-predictionio.EngineClient.html">EngineClient</a></li> |
| <li class="active"><a href="class-predictionio.EventClient.html">EventClient</a></li> |
| <li><a href="class-predictionio.FileExporter.html">FileExporter</a></li> |
| </ul> |
| |
| |
| <h3>Traits</h3> |
| <ul> |
| <li><a href="class-predictionio.Exporter.html">Exporter</a></li> |
| </ul> |
| |
| <h3>Exceptions</h3> |
| <ul> |
| <li><a href="class-predictionio.PredictionIOAPIError.html">PredictionIOAPIError</a></li> |
| </ul> |
| |
| |
| </div> |
| </div> |
| </div> |
| |
| <div id="splitter"></div> |
| |
| <div id="right"> |
| <div id="rightInner"> |
| <form id="search"> |
| <input type="hidden" name="cx" value=""> |
| <input type="hidden" name="ie" value="UTF-8"> |
| <input type="text" name="q" class="text" placeholder="Search"> |
| </form> |
| |
| <div id="navigation"> |
| <ul> |
| <li> |
| <a href="index.html" title="Overview"><span>Overview</span></a> |
| </li> |
| <li> |
| <a href="namespace-predictionio.html" title="Summary of predictionio"><span>Namespace</span></a> |
| </li> |
| <li class="active"> |
| <span>Class</span> </li> |
| </ul> |
| <ul> |
| </ul> |
| <ul> |
| </ul> |
| </div> |
| |
| <div id="content" class="class"> |
| <h1>Class EventClient</h1> |
| |
| |
| <div class="description"> |
| <p>Client for connecting to an Event Server</p> |
| </div> |
| |
| <dl class="tree"> |
| <dd style="padding-left:0px"> |
| <a href="class-predictionio.BaseClient.html"><span>predictionio\BaseClient</span></a> |
| |
| |
| |
| </dd> |
| <dd style="padding-left:30px"> |
| <img src="resources/inherit.png" alt="Extended by"> |
| <b><span>predictionio\EventClient</span></b> |
| |
| |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="info"> |
| |
| |
| <b>Namespace:</b> <a href="namespace-predictionio.html">predictionio</a><br> |
| |
| |
| <b>Located at</b> <a href="source-class-predictionio.EventClient.html#23-310" title="Go to source code">predictionio/EventClient.php</a> |
| <br> |
| </div> |
| |
| |
| |
| <table class="summary methods" id="methods"> |
| <caption>Methods summary</caption> |
| <tr data-order="__construct" id="___construct"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#___construct">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#33-50" title="Go to source code">__construct</a>( <span>string <var>$accessKey</var></span>, <span>string <var>$baseUrl</var> = <span class="php-quote">'http://localhost:7070'</span></span>, <span>float <var>$timeout</var> = <span class="php-num">0</span></span>, <span>float <var>$connectTimeout</var> = <span class="php-num">5</span> </span> )</code> |
| |
| <div class="description short"> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$accessKey</var></dt> |
| <dd>Key</dd> |
| <dt><var>$baseUrl</var></dt> |
| <dd>URL to the Event Server. Default is localhost:7070.</dd> |
| <dt><var>$timeout</var></dt> |
| <dd><p>of the request in seconds. Use 0 to wait indefinitely |
| Default is 0.</p></dd> |
| <dt><var>$connectTimeout</var></dt> |
| <dd><p>of seconds to wait while trying to connect to a server. |
| Default is 5.</p></dd> |
| </dl></div> |
| |
| |
| |
| |
| <h4>Overrides</h4> |
| <div class="list"><code><a href="class-predictionio.BaseClient.html#___construct">predictionio\BaseClient::__construct()</a></code></div> |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="setUser" id="_setUser"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_setUser">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#62-93" title="Go to source code">setUser</a>( <span>integer|string <var>$uid</var></span>, <span>array <var>$properties</var> = <span class="php-keyword1">array</span>()</span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Set a user entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Set a user entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$uid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$properties</var></dt> |
| <dd>of the user entity to set</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="unsetUser" id="_unsetUser"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_unsetUser">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#95-124" title="Go to source code">unsetUser</a>( <span>integer|string <var>$uid</var></span>, <span>array <var>$properties</var></span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Unset a user entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Unset a user entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$uid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$properties</var></dt> |
| <dd>of the user entity to unset</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="deleteUser" id="_deleteUser"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_deleteUser">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#126-150" title="Go to source code">deleteUser</a>( <span>integer|string <var>$uid</var></span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Delete a user entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Delete a user entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$uid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="setItem" id="_setItem"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_setItem">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#152-180" title="Go to source code">setItem</a>( <span>integer|string <var>$iid</var></span>, <span>array <var>$properties</var> = <span class="php-keyword1">array</span>()</span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Set an item entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Set an item entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$iid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$properties</var></dt> |
| <dd>of the item entity to set</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="unsetItem" id="_unsetItem"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_unsetItem">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#182-210" title="Go to source code">unsetItem</a>( <span>integer|string <var>$iid</var></span>, <span>array <var>$properties</var></span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Unset an item entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Unset an item entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$iid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$properties</var></dt> |
| <dd>of the item entity to unset</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="deleteItem" id="_deleteItem"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_deleteItem">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#212-236" title="Go to source code">deleteItem</a>( <span>integer|string <var>$iid</var></span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span></span> )</code> |
| |
| <div class="description short"> |
| <p>Delete an item entity</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Delete an item entity</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$iid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="recordUserActionOnItem" id="_recordUserActionOnItem"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_recordUserActionOnItem">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#238-275" title="Go to source code">recordUserActionOnItem</a>( <span>string <var>$event</var></span>, <span>integer|string <var>$uid</var></span>, <span>integer|string <var>$iid</var></span>, <span>array <var>$properties</var> = <span class="php-keyword1">array</span>()</span>, <span>string <var>$eventTime</var> = <span class="php-keyword1">null</span> </span> )</code> |
| |
| <div class="description short"> |
| <p>Record a user action on an item</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Record a user action on an item</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$event</var></dt> |
| <dd>name</dd> |
| <dt><var>$uid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$iid</var></dt> |
| <dd>Id</dd> |
| <dt><var>$properties</var></dt> |
| <dd>of the event</dd> |
| <dt><var>$eventTime</var></dt> |
| <dd><p>of the event in ISO 8601 format |
| (e.g. 2014-09-09T16:17:42.937-08:00). |
| Default is the current time.</p></dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="createEvent" id="_createEvent"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_createEvent">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#277-291" title="Go to source code">createEvent</a>( <span>array <var>$data</var></span> )</code> |
| |
| <div class="description short"> |
| <p>Create an event</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Create an event</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$data</var></dt> |
| <dd>array describing the event</dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="getEvent" id="_getEvent"> |
| |
| <td class="attributes"><code> |
| public |
| |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_getEvent">#</a> |
| <code><a href="source-class-predictionio.EventClient.html#293-309" title="Go to source code">getEvent</a>( <span>string <var>$eventId</var></span> )</code> |
| |
| <div class="description short"> |
| <p>Retrieve an event</p> |
| </div> |
| |
| <div class="description detailed hidden"> |
| <p>Retrieve an event</p> |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$eventId</var></dt> |
| <dd>ID</dd> |
| </dl></div> |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| string<br>JSON response |
| </div> |
| |
| <h4>Throws</h4> |
| <div class="list"> |
| <code><a href="class-predictionio.PredictionIOAPIError.html">predictionio\PredictionIOAPIError</a></code><br>Request error |
| </div> |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| </table> |
| |
| <table class="summary inherited"> |
| <caption>Methods inherited from <a href="class-predictionio.BaseClient.html#methods">predictionio\BaseClient</a></caption> |
| <tr> |
| <td><code> |
| <a href="class-predictionio.BaseClient.html#_getStatus">getStatus()</a>, |
| <a href="class-predictionio.BaseClient.html#_sendRequest">sendRequest()</a> |
| </code></td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <table class="summary constants" id="constants"> |
| <caption>Constants summary</caption> |
| <tr data-order="DATE_TIME_FORMAT" id="DATE_TIME_FORMAT"> |
| |
| <td class="attributes"><code>string</code></td> |
| <td class="name"> |
| <code> |
| <a href="source-class-predictionio.EventClient.html#29" title="Go to source code"><b>DATE_TIME_FORMAT</b></a> |
| </code> |
| |
| <div class="description short"> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| |
| </div> |
| </td> |
| <td class="value"> |
| <div> |
| <a href="#DATE_TIME_FORMAT" class="anchor">#</a> |
| <code>predictionio\DateTime::ISO8601</code> |
| </div> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| <table class="summary inherited"> |
| <caption>Properties inherited from <a href="class-predictionio.BaseClient.html#properties">predictionio\BaseClient</a></caption> |
| <tr> |
| <td><code> |
| <a href="class-predictionio.BaseClient.html#$client"><var>$client</var></a> |
| </code></td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| </div> |
| |
| <div id="footer"> |
| PredictionIO API PHP Client API documentation generated by <a href="http://apigen.org">ApiGen</a> |
| </div> |
| </div> |
| </div> |
| <script src="resources/combined.js"></script> |
| <script src="elementlist.js"></script> |
| </body> |
| </html> |