<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: HelixWebServicesClient</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: HelixWebServicesClient</h1> <section> <header> <h2> HelixWebServicesClient </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="HelixWebServicesClient"><span class="type-signature"></span>new HelixWebServicesClient<span class="signature">(options)</span><span class="type-signature"></span></h4> <div class="description"> <p>Create the main client object used to communicate via remote calls.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Set various properties on this object.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line39">line 39</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string</span></h4> <div class="description"> <p>If accessing an HWS instance behind a proxy, it's probably available underneath a subdirectory</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line59">line 59</a> </li></ul></dd> </dl> <h4 class="name" id="session_token"><span class="type-signature"></span>session_token<span class="type-signature"> :string</span></h4> <div class="description"> <p>Set a security token if you know it. This is used for authenticated methods.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line66">line 66</a> </li></ul></dd> </dl> <h4 class="name" id="url"><span class="type-signature"></span>url<span class="type-signature"> :string</span></h4> <div class="description"> <p>The base URL, e.g. <code>http://example.com</code> of the web server.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line46">line 46</a> </li></ul></dd> </dl> <h4 class="name" id="user"><span class="type-signature"></span>user<span class="type-signature"> :string</span></h4> <div class="description"> <p>The Perforce user name.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line52">line 52</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="createSyncProject"><span class="type-signature"></span>createSyncProject<span class="signature">(project)</span><span class="type-signature"> → {Promise.<Project>|Promise.<jqXHR, String, error>}</span></h4> <div class="description"> <p>Create a new Helix Sync project.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>project</code></td> <td class="type"> <span class="param-type">Object</span> | <span class="param-type">Project</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line265">line 265</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Will return the 'updated' project structure, which likely has several default configuration values set.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.<Project></span> | <span class="param-type">Promise.<jqXHR, String, error></span> </dd> </dl> <h4 class="name" id="listAllSyncProjects"><span class="type-signature"></span>listAllSyncProjects<span class="signature">()</span><span class="type-signature"> → {*|Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}</span></h4> <div class="description"> <p>List all Helix Sync projects on the server.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line303">line 303</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> | <span class="param-type">Promise.<Array.<Project>></span> | <span class="param-type">Promise.<jqXHR, textStatus, error></span> </dd> </dl> <h4 class="name" id="listFiles"><span class="type-signature"></span>listFiles<span class="signature">(path)</span><span class="type-signature"> → {Promise.<Array.<PathItem>>|Promise.<jqXHR, String, error>}</span></h4> <div class="description"> <p>List files at the particular directory level.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>The directory to list. Should be an absolute depot path, e.g., <code>//depot/dirA</code>. When empty, this lists depots in the system.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line234">line 234</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Promises resolve to a list of PathItem models or the error data. Each PathItem is either all depot paths (if <code>path</code> is empty) or the child Directory or Files of <code>path</code>.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.<Array.<PathItem>></span> | <span class="param-type">Promise.<jqXHR, String, error></span> </dd> </dl> <h4 class="name" id="listMySyncProjects"><span class="type-signature"></span>listMySyncProjects<span class="signature">()</span><span class="type-signature"> → {*|Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}</span></h4> <div class="description"> <p>List the Helix Sync projects the current user is a member of.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line293">line 293</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> | <span class="param-type">Promise.<Array.<Project>></span> | <span class="param-type">Promise.<jqXHR, textStatus, error></span> </dd> </dl> <h4 class="name" id="logIn"><span class="type-signature"></span>logIn<span class="signature">(user<span class="signature-attributes">opt</span>, password)</span><span class="type-signature"> → {Promise.<String>|Promise.<jqXHR, String, error>}</span></h4> <div class="description"> <p>Creates a new session token by logging into the server.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>user</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Optional attribute. If you specify it, we'll cache it as the <code>user</code> property.</p></td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> </td> <td class="description last"><p>Required Perforce password for the user.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line165">line 165</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>On success, you'll receive the security token, which will be cached on this client object as the <code>session_token</code> property.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.<String></span> | <span class="param-type">Promise.<jqXHR, String, error></span> </dd> </dl> <h4 class="name" id="logOut"><span class="type-signature"></span>logOut<span class="signature">()</span><span class="type-signature"> → {Promise|Promise.<jqXHR, textStatus, error>}</span></h4> <div class="description"> <p>Destroys the session (on the server)</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line201">line 201</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> | <span class="param-type">Promise.<jqXHR, textStatus, error></span> </dd> </dl> <h4 class="name" id="syncProjects"><span class="type-signature"></span>syncProjects<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}</span></h4> <div class="description"> <p>Fetch a listing of Helix Sync projects from the server.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last"><p>Set 'listType'</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="helix_web_services_client.js.html">helix_web_services_client.js</a>, <a href="helix_web_services_client.js.html#line315">line 315</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.<Array.<Project>></span> | <span class="param-type">Promise.<jqXHR, textStatus, error></span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="HelixWebServicesClient.html">HelixWebServicesClient</a></li><li><a href="models.Depot.html">Depot</a></li><li><a href="models.Dir.html">Dir</a></li><li><a href="models.File.html">File</a></li></ul><h3>Mixins</h3><ul><li><a href="Node.html">Node</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addSessionExpiredHandler">addSessionExpiredHandler</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0-dev</a> on Wed Jun 24 2015 12:48:35 GMT-0700 (PDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/build/doc/helix_web_services_client_js/HelixWebServicesClient.html | |||||
#4 | 14151 | tjuricek |
Add depot tree control and selection to the create projects page. Styling and error checking is kept to a minimum for the time being. Our goal is just internal workflow and feedback. |
||
#3 | 14108 | tjuricek |
Added models for handling Perforce server depot listing and traversal. This is not complete, however, the models are a start to making it easy to generate a tree control. (Most tree controls in the wild assume you know the tree structure from the start, which is not true in our case.) The tricky bit is making it easy to build the tree out given that you're visiting only one directory at a time. |
||
#2 | 14105 | tjuricek |
add 'listMy' and 'listAll' sync project variations to the JS API. Also, set up the project list to switch between the two project types. Also, setup each item in the project list to not be a grouped list item, but a custom view component. Not particularly useful, but it just displays a description now. |
||
#1 | 14002 | tjuricek | Some preliminary API documentation for the JavaScript SDK. |