<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: HelixWebServicesClient — Documentation by YARD 0.8.7.6 </title> <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" /> <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = ''; framesUrl = "frames.html#!HelixWebServicesClient.html"; </script> <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="_index.html">Index (H)</a> » <span class="title">HelixWebServicesClient</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="file_list.html"> File List </a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Class: HelixWebServicesClient </h1> <dl class="box"> <dt class="r1">Inherits:</dt> <dd class="r1"> <span class="inheritName">Object</span> <ul class="fullTree"> <li>Object</li> <li class="next">HelixWebServicesClient</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> <dt class="r2 last">Defined in:</dt> <dd class="r2 last">lib/helix_web_services_client.rb<span class="defines">,<br /> lib/helix_web_services_client/jobs.rb,<br /> lib/helix_web_services_client/login.rb,<br /> lib/helix_web_services_client/files.rb,<br /> lib/helix_web_services_client/users.rb,<br /> lib/helix_web_services_client/config.rb,<br /> lib/helix_web_services_client/depots.rb,<br /> lib/helix_web_services_client/labels.rb,<br /> lib/helix_web_services_client/groups.rb,<br /> lib/helix_web_services_client/changes.rb,<br /> lib/helix_web_services_client/servers.rb,<br /> lib/helix_web_services_client/streams.rb,<br /> lib/helix_web_services_client/version.rb,<br /> lib/helix_web_services_client/clients.rb,<br /> lib/helix_web_services_client/branches.rb,<br /> lib/helix_web_services_client/projects.rb,<br /> lib/helix_web_services_client/commands.rb,<br /> lib/helix_web_services_client/triggers.rb,<br /> lib/helix_web_services_client/counters.rb,<br /> lib/helix_web_services_client/helix_sync.rb,<br /> lib/helix_web_services_client/protections.rb</span> </dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>The client object handles authenticating and making calls to Helix Web Services.</p> <p>See our user guide online at: <a href="https://swarm.workshop.perforce.com/projects/perforce-software-helix-web-services/view/main/build/doc/p4ws.html#ruby_client_sdk_overview">swarm.workshop.perforce.com/projects/perforce-software-helix-web-services/view/main/build/doc/p4ws.html#ruby_client_sdk_overview</a></p> </div> </div> <div class="tags"> </div> <h2>Constant Summary</h2> <dl class="constants"> <dt id="INITIALIZE_LOCAL_OPTIONS-constant" class="">INITIALIZE_LOCAL_OPTIONS = <div class="docstring"> <div class="discussion"> <p>Some values to initialize are only used by this class, and are not passed on to the Faraday initializer</p> </div> </div> <div class="tags"> </div> </dt> <dd><pre class="code"><span class='lbracket'>[</span><span class='symbol'>:user</span><span class='comma'>,</span> <span class='symbol'>:password</span><span class='comma'>,</span> <span class='symbol'>:ticket</span><span class='comma'>,</span> <span class='symbol'>:prefix</span><span class='comma'>,</span> <span class='symbol'>:api_level</span><span class='comma'>,</span> <span class='symbol'>:settings</span><span class='comma'>,</span> <span class='symbol'>:debug</span><span class='rbracket'>]</span></pre></dd> <dt id="VERSION-constant" class="">VERSION = </dt> <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>2015.1.0.pre1</span><span class='tstring_end'>'</span></span></pre></dd> </dl> <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#api_level-instance_method" title="#api_level (instance method)">- (Object) <strong>api_level</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>The API level to use.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#prefix-instance_method" title="#prefix (instance method)">- (Object) <strong>prefix</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Typically, Helix Web Services is mounted under /hws behind a reverse proxy.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#ticket-instance_method" title="#ticket (instance method)">- (Object) <strong>ticket</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Upon successful login, we store the P4 ticket return value here.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#user-instance_method" title="#user (instance method)">- (Object) <strong>user</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>The Helix Versioning Engine login.</p> </div></span> </li> </ul> <h2> Class Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#open-class_method" title="open (class method)">+ (Object) <strong>open</strong>(connection) </a> </span> <span class="summary_desc"><div class='inline'> <p>Provides standard I/O style interface, where when called in a block, will automatically close() the client when done.</p> </div></span> </li> </ul> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#add_setting-instance_method" title="#add_setting (instance method)">- (Object) <strong>add_setting</strong>(key, value) </a> </span> <span class="summary_desc"><div class='inline'> <p>Set an override for all requests.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#arg_params-instance_method" title="#arg_params (instance method)">- (Object) <strong>arg_params</strong>(arg_values) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a hash and creates keys 'arg1', 'arg2', etc that points to the values in the arg_values array.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#assert_ok-instance_method" title="#assert_ok (instance method)">- (Object) <strong>assert_ok</strong>(response) </a> </span> <span class="summary_desc"><div class='inline'> <p>Raises an error when the response is not 200.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#branch-instance_method" title="#branch (instance method)">- (Object) <strong>branch</strong>(branch) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the branch instance indicated by the branch name (or model).</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#branches-instance_method" title="#branches (instance method)">- (Object) <strong>branches</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Array of Branch objects stored in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#change-instance_method" title="#change (instance method)">- (Object) <strong>change</strong>(change) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the Change indicated by the change number or model.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#changes-instance_method" title="#changes (instance method)">- (Object) <strong>changes</strong>(options = nil) </a> </span> <span class="summary_desc"><div class='inline'> <p>List changelists in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#client-instance_method" title="#client (instance method)">- (Object) <strong>client</strong>(client) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the client instance indicated by the client name or model.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#clients-instance_method" title="#clients (instance method)">- (Object) <strong>clients</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Array of Client objects stored in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#command-instance_method" title="#command (instance method)">- (OpenModel) <strong>command</strong>(cmd, *args) </a> </span> <span class="summary_desc"><div class='inline'> <p>Execute a Perforce command.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#command_with_input-instance_method" title="#command_with_input (instance method)">- (Object) <strong>command_with_input</strong>(cmd, input, *args) </a> </span> <span class="summary_desc"><div class='inline'> <p>Generic run command with and input body.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#commit_change-instance_method" title="#commit_change (instance method)">- (Object) <strong>commit_change</strong>(change) </a> </span> <span class="summary_desc"><div class='inline'> <p>Submits the shelved changelist.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#counter-instance_method" title="#counter (instance method)">- (Object) <strong>counter</strong>(counter) </a> </span> <span class="summary_desc"><div class='inline'> <p>Return the counter hash for a particular counter key.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#counters-instance_method" title="#counters (instance method)">- (Object) <strong>counters</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>List all counters in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_branch-instance_method" title="#create_branch (instance method)">- (Object) <strong>create_branch</strong>(branch) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new branch in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_change-instance_method" title="#create_change (instance method)">- (Object) <strong>create_change</strong>(change) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new changelist, that can be used for a few different tasks.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_client-instance_method" title="#create_client (instance method)">- (Object) <strong>create_client</strong>(client) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new client in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_depot-instance_method" title="#create_depot (instance method)">- (Object) <strong>create_depot</strong>(depot) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new depot in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_group-instance_method" title="#create_group (instance method)">- (Object) <strong>create_group</strong>(group) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new group in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_helix_sync_client-instance_method" title="#create_helix_sync_client (instance method)">- (Object) <strong>create_helix_sync_client</strong>(project_id, device, root) </a> </span> <span class="summary_desc"><div class='inline'> <p>Create a new client workspace specification for a Helix Sync project.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_helix_sync_pending_changelist-instance_method" title="#create_helix_sync_pending_changelist (instance method)">- (Object) <strong>create_helix_sync_pending_changelist</strong>(project_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Get a pending changelist number for the Helix Sync project.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_job-instance_method" title="#create_job (instance method)">- (Object) <strong>create_job</strong>(job) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new job in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_label-instance_method" title="#create_label (instance method)">- (Object) <strong>create_label</strong>(label) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new label in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_server-instance_method" title="#create_server (instance method)">- (Object) <strong>create_server</strong>(server) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new server in the system based on the Server instance.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_stream-instance_method" title="#create_stream (instance method)">- (Object) <strong>create_stream</strong>(stream) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new stream in the system based on the Stream instance.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#create_user-instance_method" title="#create_user (instance method)">- (Object) <strong>create_user</strong>(user) </a> </span> <span class="summary_desc"><div class='inline'> <p>Creates a new user in the system based on the User instance.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_branch-instance_method" title="#delete_branch (instance method)">- (Object) <strong>delete_branch</strong>(branch) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the branch specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_client-instance_method" title="#delete_client (instance method)">- (Object) <strong>delete_client</strong>(client) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the client specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_counter-instance_method" title="#delete_counter (instance method)">- (Object) <strong>delete_counter</strong>(counter) </a> </span> <span class="summary_desc"><div class='inline'> <p>Delete the counter.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_depot-instance_method" title="#delete_depot (instance method)">- (Object) <strong>delete_depot</strong>(depot) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the depot specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_file-instance_method" title="#delete_file (instance method)">- (Object) <strong>delete_file</strong>(path) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_group-instance_method" title="#delete_group (instance method)">- (Object) <strong>delete_group</strong>(group) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the group specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_job-instance_method" title="#delete_job (instance method)">- (Object) <strong>delete_job</strong>(job_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the job specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_label-instance_method" title="#delete_label (instance method)">- (Object) <strong>delete_label</strong>(label) </a> </span> <span class="summary_desc"><div class='inline'> <p>Deletes the label specification in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_server-instance_method" title="#delete_server (instance method)">- (Object) <strong>delete_server</strong>(server) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_stream-instance_method" title="#delete_stream (instance method)">- (Object) <strong>delete_stream</strong>(stream) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#delete_user-instance_method" title="#delete_user (instance method)">- (Object) <strong>delete_user</strong>(user) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#depot-instance_method" title="#depot (instance method)">- (Object) <strong>depot</strong>(depot) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the depot instance indicated by the depot name (or depot object).</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#depots-instance_method" title="#depots (instance method)">- (Object) <strong>depots</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Array of Depot objects stored in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#execute_method_no_body-instance_method" title="#execute_method_no_body (instance method)">- (Object) <strong>execute_method_no_body</strong>(method, path, params = nil) </a> </span> <span class="summary_desc"><div class='inline'> <p>Runs the method against Helix Web Services, checks for errors, then parses the JSON response.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#execute_method_with_body-instance_method" title="#execute_method_with_body (instance method)">- (Object) <strong>execute_method_with_body</strong>(method, path, params = nil, body = nil) </a> </span> <span class="summary_desc"><div class='inline'> <p>Runs the method against Helix Web Services, checks for errors, then parses the JSON response.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#fetch_helix_sync_latest_changelist-instance_method" title="#fetch_helix_sync_latest_changelist (instance method)">- (Object) <strong>fetch_helix_sync_latest_changelist</strong>(project_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Retrieve the latest changelist.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#fetch_helix_sync_pending_changelist-instance_method" title="#fetch_helix_sync_pending_changelist (instance method)">- (Object) <strong>fetch_helix_sync_pending_changelist</strong>(project_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Retrieve the pending changelist.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#file-instance_method" title="#file (instance method)">- (Object) <strong>file</strong>(path) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the file metadata at this location, with the <code>content</code> field filled out.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#files-instance_method" title="#files (instance method)">- (Object) <strong>files</strong>(path = '') </a> </span> <span class="summary_desc"><div class='inline'> <p>General file browsing method.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#group-instance_method" title="#group (instance method)">- (Object) <strong>group</strong>(group) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the group instance indicated by the group name (or group object).</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#groups-instance_method" title="#groups (instance method)">- (Object) <strong>groups</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Array of Group objects stored in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#hve_path-instance_method" title="#hve_path (instance method)">- (Object) <strong>hve_path</strong>(subpath) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#increment_counter-instance_method" title="#increment_counter (instance method)">- (Object) <strong>increment_counter</strong>(counter) </a> </span> <span class="summary_desc"><div class='inline'> <p>Increment the value of a numerical counter.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#initialize-instance_method" title="#initialize (instance method)">- (HelixWebServicesClient) <strong>initialize</strong>(options) </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'> <p>Client initialization can handle ensuring a valid security token to the server.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#job-instance_method" title="#job (instance method)">- (Object) <strong>job</strong>(job_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the array of jobs in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#jobs-instance_method" title="#jobs (instance method)">- (Object) <strong>jobs</strong> </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#label-instance_method" title="#label (instance method)">- (Object) <strong>label</strong>(label) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns the label instance indicated by the label name (or label object).</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#labels-instance_method" title="#labels (instance method)">- (Object) <strong>labels</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Array of Label objects stored in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#login-instance_method" title="#login (instance method)">- (Object) <strong>login</strong>(user, password) </a> </span> <span class="summary_desc"><div class='inline'> <p>Generates a host unlocked ticket for the user.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#p4_ticket%3F-instance_method" title="#p4_ticket? (instance method)">- (Boolean) <strong>p4_ticket?</strong>(str) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#path_for-instance_method" title="#path_for (instance method)">- (Object) <strong>path_for</strong>(subpath) </a> </span> <span class="summary_desc"><div class='inline'> <p>Basically just prepends the prefix to our subpath, typically, '/p4'.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#project-instance_method" title="#project (instance method)">- (Object) <strong>project</strong>(project_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Return the project details.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#projects-instance_method" title="#projects (instance method)">- (Object) <strong>projects</strong>(details: nil, extension: nil) </a> </span> <span class="summary_desc"><div class='inline'> <p>Lists the projects available on the server for the user.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#protections-instance_method" title="#protections (instance method)">- (Object) <strong>protections</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Fetch all protections in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#remove_setting-instance_method" title="#remove_setting (instance method)">- (Object) <strong>remove_setting</strong>(key) </a> </span> <span class="summary_desc"><div class='inline'> <p>Remove a setting added via add_setting.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#run_method_no_body-instance_method" title="#run_method_no_body (instance method)">- (Object) <strong>run_method_no_body</strong>(method, path, params = nil) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#run_method_with_body-instance_method" title="#run_method_with_body (instance method)">- (Object) <strong>run_method_with_body</strong>(method, path, params = nil, body = nil) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong>(server) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns a HelixWebServicesClient::OpenModel for the login.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#servers-instance_method" title="#servers (instance method)">- (Object) <strong>servers</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns an array of Server objects representing people in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#services-instance_method" title="#services (instance method)">- (Object) <strong>services</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns an array of all service definitions in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#set_auth-instance_method" title="#set_auth (instance method)">- (Object) <strong>set_auth</strong>(user, token) </a> </span> <span class="summary_desc"><div class='inline'> <p>Note: this class is really just common implementation.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#set_counter-instance_method" title="#set_counter (instance method)">- (Object) <strong>set_counter</strong>(counter) </a> </span> <span class="summary_desc"><div class='inline'> <p>Set the counter value.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#stream-instance_method" title="#stream (instance method)">- (Object) <strong>stream</strong>(stream) </a> </span> <span class="summary_desc"><div class='inline'> <p>Fetch single stream details.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#streams-instance_method" title="#streams (instance method)">- (Object) <strong>streams</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns an array of Stream objects representing people in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#submit_helix_sync_pending_change-instance_method" title="#submit_helix_sync_pending_change (instance method)">- (Object) <strong>submit_helix_sync_pending_change</strong>(project_id) </a> </span> <span class="summary_desc"><div class='inline'> <p>Submits the pending changelist for the helix sync project.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#triggers-instance_method" title="#triggers (instance method)">- (OpenModel) <strong>triggers</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Fetch the list of trigger lines in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_branch-instance_method" title="#update_branch (instance method)">- (Object) <strong>update_branch</strong>(branch) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the branch specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_client-instance_method" title="#update_client (instance method)">- (Object) <strong>update_client</strong>(client) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the client specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_depot-instance_method" title="#update_depot (instance method)">- (Object) <strong>update_depot</strong>(depot) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the depot specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_group-instance_method" title="#update_group (instance method)">- (Object) <strong>update_group</strong>(group) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the group specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_job-instance_method" title="#update_job (instance method)">- (Object) <strong>update_job</strong>(job) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the job specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_label-instance_method" title="#update_label (instance method)">- (Object) <strong>update_label</strong>(label) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the label specification.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_protections-instance_method" title="#update_protections (instance method)">- (Object) <strong>update_protections</strong>(protections) </a> </span> <span class="summary_desc"><div class='inline'> <p>Updates the protections table based on the Protections instance passed in.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_server-instance_method" title="#update_server (instance method)">- (Object) <strong>update_server</strong>(server) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_stream-instance_method" title="#update_stream (instance method)">- (Object) <strong>update_stream</strong>(stream) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_triggers-instance_method" title="#update_triggers (instance method)">- (Object) <strong>update_triggers</strong>(triggers) </a> </span> <span class="summary_desc"><div class='inline'> <p>Update the triggers table using the Triggers model instance.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#update_user-instance_method" title="#update_user (instance method)">- (Object) <strong>update_user</strong>(user) </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#upload_file-instance_method" title="#upload_file (instance method)">- (Object) <strong>upload_file</strong>(file) </a> </span> <span class="summary_desc"><div class='inline'> <p>Upload a single file's content.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#upload_files-instance_method" title="#upload_files (instance method)">- (Object) <strong>upload_files</strong>(files: [], path: nil, description: nil) </a> </span> <span class="summary_desc"><div class='inline'> <p>Upload multiple files.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#user_details-instance_method" title="#user_details (instance method)">- (Object) <strong>user_details</strong>(user) </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns a HelixWebServicesClient::OpenModel for the login.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#users-instance_method" title="#users (instance method)">- (Object) <strong>users</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Returns an array of User objects representing people in the system.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Return the product version ID of the Helix Web Services instance.</p> </div></span> </li> </ul> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> - (<tt><span class='object_link'><a href="" title="HelixWebServicesClient (class)">HelixWebServicesClient</a></span></tt>) <strong>initialize</strong>(options) </h3><div class="docstring"> <div class="discussion"> <p>Client initialization can handle ensuring a valid security token to the server.</p> <p>Any client created via new should take care to call <code>close()</code>.</p> <h2 id="label-Available+Options">Available Options</h2> <p>These options are used to configure the underlying Faraday connection:</p> <ul><li> <p><code>:url</code> - String base URL.</p> </li><li> <p><code>:params</code> - Hash of URI query unencoded key/value pairs.</p> </li><li> <p><code>:header</code> - Hash of unencoded HTTP header key/value pairs.</p> </li><li> <p><code>:request</code> - Hash of request options.</p> </li><li> <p><code>:ssl</code> - Hash of SSL options.</p> </li><li> <p><code>:proxy</code> - Hash of Proxy options.</p> </li></ul> <p>These options are specific to Helix Web Services:</p> <ul><li> <p><code>:user</code> - The Helix Versioning Engine login</p> </li><li> <p><code>:password</code> - If set, we will generate a ticket using this password during initialization</p> </li><li> <p><code>:ticket</code> - If not nil, we will use this ticket as our authentication password</p> </li><li> <p><code>:debug</code> - Add response logging if set to true</p> </li></ul> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>options</span> <span class='type'>(<tt>Hash</tt>)</span> — <div class='inline'> <p>See the section available options above</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 56</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='ivar'>@api_level</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:api_level</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:api_level</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>78</span><span class='tstring_end'>'</span></span> <span class='comment'># Filter out options we pass to Faraday </span> <span class='id identifier rubyid_faraday_options'>faraday_options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='op'>!</span><span class='const'>INITIALIZE_LOCAL_OPTIONS</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='ivar'>@conn</span> <span class='op'>=</span> <span class='const'>Faraday</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_faraday_options'>faraday_options</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_conn'>conn</span><span class='op'>|</span> <span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='symbol'>:multipart</span> <span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='symbol'>:url_encoded</span> <span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span> <span class='symbol'>:logger</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:debug</span><span class='rbracket'>]</span> <span class='id identifier rubyid_conn'>conn</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span> <span class='symbol'>:net_http</span> <span class='kw'>end</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:url</span><span class='rparen'>)</span> <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:url</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='ivar'>@prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span> <span class='op'>?</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>end</span> <span class='ivar'>@user</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:user</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span> <span class='ivar'>@ticket</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ticket</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:ticket</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:settings</span><span class='rparen'>)</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:settings</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_add_setting'>add_setting</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:password</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='ivar'>@user</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_path_for'>path_for</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/auth/v1/login</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='id identifier rubyid_assert_ok'>assert_ok</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='ivar'>@ticket</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='kw'>end</span> <span class='id identifier rubyid_set_auth'>set_auth</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='id identifier rubyid_ticket'>ticket</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ticket'>ticket</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="instance_attr_details" class="attr_details"> <h2>Instance Attribute Details</h2> <span id="api_level=-instance_method"></span> <div class="method_details first"> <h3 class="signature first" id="api_level-instance_method"> - (<tt>Object</tt>) <strong>api_level</strong> </h3><div class="docstring"> <div class="discussion"> <p>The API level to use. Defaults to 78 (2015.1)</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_api_level'>api_level</span> <span class='ivar'>@api_level</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="prefix=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="prefix-instance_method"> - (<tt>Object</tt>) <strong>prefix</strong> </h3><div class="docstring"> <div class="discussion"> <p>Typically, Helix Web Services is mounted under /hws behind a reverse proxy. If a path is specified in the originating URL, we save the prefix here, and preprend it to every request.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 23 24 25</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 23</span> <span class='kw'>def</span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='ivar'>@prefix</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="ticket=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="ticket-instance_method"> - (<tt>Object</tt>) <strong>ticket</strong> </h3><div class="docstring"> <div class="discussion"> <p>Upon successful login, we store the P4 ticket return value here.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 18 19 20</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 18</span> <span class='kw'>def</span> <span class='id identifier rubyid_ticket'>ticket</span> <span class='ivar'>@ticket</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="user=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="user-instance_method"> - (<tt>Object</tt>) <strong>user</strong> </h3><div class="docstring"> <div class="discussion"> <p>The Helix Versioning Engine login</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 15 16 17</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 15</span> <span class='kw'>def</span> <span class='id identifier rubyid_user'>user</span> <span class='ivar'>@user</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="class_method_details" class="method_details_list"> <h2>Class Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="open-class_method"> + (<tt>Object</tt>) <strong>open</strong>(connection) </h3><div class="docstring"> <div class="discussion"> <p>Provides standard I/O style interface, where when called in a block, will automatically close() the client when done. Otherwise, your code should call client.close() manually.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 119 120 121 122 123 124 125 126 127 128 129</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 119</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='rparen'>)</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='kw'>yield</span> <span class='id identifier rubyid_client'>client</span> <span class='kw'>else</span> <span class='kw'>return</span> <span class='id identifier rubyid_client'>client</span> <span class='kw'>end</span> <span class='kw'>ensure</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>&&</span> <span class='id identifier rubyid_client'>client</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="add_setting-instance_method"> - (<tt>Object</tt>) <strong>add_setting</strong>(key, value) </h3><div class="docstring"> <div class="discussion"> <p>Set an override for all requests.</p> <p>See “configuration” in HWS documentation.</p> <p>This will automatically add the right prefix for overriding an HWS setting.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>key</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The setting value as indicated in documentation, e.g., <code>P4PORT</code></p> </div> </li> <li> <span class='name'>value</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The value to set</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 105 106 107 108 109</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 105</span> <span class='kw'>def</span> <span class='id identifier rubyid_add_setting'>add_setting</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='comment'># Note: Rack will automatically convert all hyphens to underscores... </span> <span class='comment'># but Nginx will (by default) block all underscores. Find a happy middle. </span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Perforce-Helix-Web-Services-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="arg_params-instance_method"> - (<tt>Object</tt>) <strong>arg_params</strong>(arg_values) </h3><div class="docstring"> <div class="discussion"> <p>Creates a hash and creates keys 'arg1', 'arg2', etc that points to the values in the arg_values array. This is basically only used by the run methods</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 45 46 47 48 49</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/commands.rb', line 45</span> <span class='kw'>def</span> <span class='id identifier rubyid_arg_params'>arg_params</span><span class='lparen'>(</span><span class='id identifier rubyid_arg_values'>arg_values</span><span class='rparen'>)</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='id identifier rubyid_arg_values'>arg_values</span><span class='period'>.</span><span class='id identifier rubyid_each_index'>each_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_ii'>ii</span><span class='op'>|</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>arg</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ii'>ii</span> <span class='op'>+</span> <span class='int'>1</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_arg_values'>arg_values</span><span class='lbracket'>[</span><span class='id identifier rubyid_ii'>ii</span><span class='rbracket'>]</span> <span class='rbrace'>}</span> <span class='id identifier rubyid_params'>params</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="assert_ok-instance_method"> - (<tt>Object</tt>) <strong>assert_ok</strong>(response) </h3><div class="docstring"> <div class="discussion"> <p>Raises an error when the response is not 200. Some errors may have diagnostic information in the response body, so we pass that on as well</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 208</span> <span class='kw'>def</span> <span class='id identifier rubyid_assert_ok'>assert_ok</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>>=</span> <span class='int'>400</span> <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>403</span> <span class='id identifier rubyid_fail'>fail</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>Unauthenticated</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Illegal login or password</span><span class='tstring_end'>'</span></span> <span class='kw'>elsif</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>404</span> <span class='id identifier rubyid_fail'>fail</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>ResourceNotFound</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Required resource not found</span><span class='tstring_end'>'</span></span> <span class='kw'>elsif</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>500</span> <span class='op'>&&</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>begin</span> <span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span> <span class='id identifier rubyid_messages'>messages</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='kw'>end</span> <span class='id identifier rubyid_fail'>fail</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>PerforceProblem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_messages'>messages</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Unknown issue from the Perforce server</span><span class='tstring_end'>'</span></span> <span class='kw'>else</span> <span class='id identifier rubyid_fail'>fail</span> <span class='const'>Errors</span><span class='op'>::</span><span class='const'>ServerError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown problem. Response code: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="branch-instance_method"> - (<tt>Object</tt>) <strong>branch</strong>(branch) </h3><div class="docstring"> <div class="discussion"> <p>Returns the branch instance indicated by the branch name (or model)</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 14 15 16 17 18</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/branches.rb', line 14</span> <span class='kw'>def</span> <span class='id identifier rubyid_branch'>branch</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='id identifier rubyid_branch'>branch</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_branch'>branch</span> <span class='kw'>unless</span> <span class='id identifier rubyid_branch'>branch</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>branches/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="branches-instance_method"> - (<tt>Object</tt>) <strong>branches</strong> </h3><div class="docstring"> <div class="discussion"> <p>Array of Branch objects stored in the system. Not all fields will be filled out (e.g., view).</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 8 9 10 11</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/branches.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_branches'>branches</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>branches</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="change-instance_method"> - (<tt>Object</tt>) <strong>change</strong>(change) </h3><div class="docstring"> <div class="discussion"> <p>Returns the Change indicated by the change number or model.</p> <p>If there are files submitted with the change, the change.files field should be filled out.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 21 22 23 24 25</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/changes.rb', line 21</span> <span class='kw'>def</span> <span class='id identifier rubyid_change'>change</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span> <span class='id identifier rubyid_change_id'>change_id</span> <span class='op'>=</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_change'>change</span> <span class='op'>:</span> <span class='id identifier rubyid_change'>change</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>changes/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_change_id'>change_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="changes-instance_method"> - (<tt>Object</tt>) <strong>changes</strong>(options = nil) </h3><div class="docstring"> <div class="discussion"> <p>List changelists in the system</p> <p>options: - :max - cap the number of results - :status - :pending, :submitted, or :shelved (see Change) - :user - The perforce login to check out - :files - Depot path pattern to restrict changes to</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 12 13 14 15</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/changes.rb', line 12</span> <span class='kw'>def</span> <span class='id identifier rubyid_changes'>changes</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>changes</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_obj'>obj</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="client-instance_method"> - (<tt>Object</tt>) <strong>client</strong>(client) </h3><div class="docstring"> <div class="discussion"> <p>Returns the client instance indicated by the client name or model</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 12 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/clients.rb', line 12</span> <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span> <span class='kw'>unless</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clients/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="clients-instance_method"> - (<tt>Object</tt>) <strong>clients</strong> </h3><div class="docstring"> <div class="discussion"> <p>Array of Client objects stored in the system. Not all fields will be filled out (e.g., view).</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/clients.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_clients'>clients</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>clients</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="close-instance_method"> - (<tt>Object</tt>) <strong>close</strong> </h3><table class="source_code"> <tr> <td> <pre class="lines"> 94 95</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 94</span> <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="command-instance_method"> - (<tt><span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>) <strong>command</strong>(cmd, *args) </h3><div class="docstring"> <div class="discussion"> <p>Execute a Perforce command.</p> <p>First argument should always be the command, followed by command line arguments.</p> <p>Expect to always have an array of hashes as output.</p> <p>Not all commands are allowed, since the command will be executed on the web server. In general, if your command requires a client workspace, it will likely fail, or be blocked.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt><span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>)</span> — <div class='inline'> <p>wraps the output in an OpenModel instance</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 18 19 20 21 22</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/commands.rb', line 18</span> <span class='kw'>def</span> <span class='id identifier rubyid_command'>command</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_arg_params'>arg_params</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>commands/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="command_with_input-instance_method"> - (<tt>Object</tt>) <strong>command_with_input</strong>(cmd, input, *args) </h3><div class="docstring"> <div class="discussion"> <p>Generic run command with and input body.</p> <p>The first argument is the general command, followed by the input data, then followed by additional command line arguments.</p> <p>Expect the output to always be an array of hashes.</p> <p>Not all commands are allowed, since the command will be executed on the web server. In general, if your command requires a client workspace, it will likely fail, or be blocked.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 34 35 36 37 38 39 40</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/commands.rb', line 34</span> <span class='kw'>def</span> <span class='id identifier rubyid_command_with_input'>command_with_input</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_arg_params'>arg_params</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:cmd</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_cmd'>cmd</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>commands/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='comma'>,</span> <span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='kw'>and</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="commit_change-instance_method"> - (<tt>Object</tt>) <strong>commit_change</strong>(change) </h3><div class="docstring"> <div class="discussion"> <p>Submits the shelved changelist.</p> <p>This changelist should be pending, with no open files, and list of shelved changes. If you require resolves, this method will fail.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>change</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The changelist number</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 61 62 63 64</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/changes.rb', line 61</span> <span class='kw'>def</span> <span class='id identifier rubyid_commit_change'>commit_change</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span> <span class='id identifier rubyid_change_id'>change_id</span> <span class='op'>=</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_change'>change</span> <span class='op'>:</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>changes/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_change_id'>change_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="counter-instance_method"> - (<tt>Object</tt>) <strong>counter</strong>(counter) </h3><div class="docstring"> <div class="discussion"> <p>Return the counter hash for a particular counter key.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>counter</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The counter ID</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 14 15 16 17</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/counters.rb', line 14</span> <span class='kw'>def</span> <span class='id identifier rubyid_counter'>counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>counters/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="counters-instance_method"> - (<tt>Object</tt>) <strong>counters</strong> </h3><div class="docstring"> <div class="discussion"> <p>List all counters in the system. Each counter typically has a <code>counter</code> and <code>value</code> attribute.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/counters.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_counters'>counters</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>counters</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_branch-instance_method"> - (<tt>Object</tt>) <strong>create_branch</strong>(branch) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new branch in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 21 22 23 24</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/branches.rb', line 21</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_branch'>create_branch</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>branches</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_change-instance_method"> - (<tt>Object</tt>) <strong>create_change</strong>(change) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new changelist, that can be used for a few different tasks.</p> <p>The change should be a hash with the following top-level keys:</p> <ul><li> <p><code>Description</code>: The change description (optional)</p> </li><li> <p><code>Files</code>: An array of Hashes</p> </li></ul> <p>Each hash in the <code>Files</code> array can contain these keys:</p> <ul><li> <p><code>DepotFile</code>: The depot path</p> </li><li> <p><code>Action</code>: One of 'upload', 'move', or 'branch'</p> </li><li> <p><code>FromDepotFile</code>: if action is 'move' or 'branch', the source file</p> </li><li> <p><code>Content</code>: Base64-encoded file content for 'upload' actions</p> </li><li> <p><code>RequireVersion</code>: Optional value for 'upload' actions, if set, will fail the upload if the current file version is not this version.</p> </li></ul> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>change</span> <span class='type'>(<tt>Hash</tt>)</span> — <div class='inline'> <p>See method description</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 50 51 52 53</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/changes.rb', line 50</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_change'>create_change</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span> <span class='id identifier rubyid_change'>change</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_change'>change</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>changes</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_change'>change</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_client-instance_method"> - (<tt>Object</tt>) <strong>create_client</strong>(client) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new client in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 19 20 21 22 23</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/clients.rb', line 19</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_client'>create_client</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>clients</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_depot-instance_method"> - (<tt>Object</tt>) <strong>create_depot</strong>(depot) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new depot in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 20 21 22 23</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/depots.rb', line 20</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_depot'>create_depot</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='id identifier rubyid_depot'>depot</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>depots</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_group-instance_method"> - (<tt>Object</tt>) <strong>create_group</strong>(group) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new group in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 20 21 22 23</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/groups.rb', line 20</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_group'>create_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>groups</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_helix_sync_client-instance_method"> - (<tt>Object</tt>) <strong>create_helix_sync_client</strong>(project_id, device, root) </h3><div class="docstring"> <div class="discussion"> <p>Create a new client workspace specification for a Helix Sync project.</p> <p>Returns a simple object with a 'client' property.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 8 9 10 11 12 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/helix_sync.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_helix_sync_client'>create_helix_sync_client</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device'>device</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span><span class='rparen'>)</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>project:</span> <span class='id identifier rubyid_project_id'>project_id</span><span class='comma'>,</span> <span class='label'>device:</span> <span class='id identifier rubyid_device'>device</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='id identifier rubyid_root'>root</span> <span class='rbrace'>}</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/helix_sync/v1/clients</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_helix_sync_pending_changelist-instance_method"> - (<tt>Object</tt>) <strong>create_helix_sync_pending_changelist</strong>(project_id) </h3><div class="docstring"> <div class="discussion"> <p>Get a pending changelist number for the Helix Sync project.</p> <p>If the changelist already exists, it should just return that.</p> <p>IMPORTANT: The changelist should be updated to use your local client. You won't be able to use or submit this changelist.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>project_id</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The project ID.</p> </div> </li> </ul> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'></span> <div class='inline'> <p>A hash containing a <code>change</code> field</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 27 28 29 30</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/helix_sync.rb', line 27</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_helix_sync_pending_changelist'>create_helix_sync_pending_changelist</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/helix_sync/v1/changes/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_job-instance_method"> - (<tt>Object</tt>) <strong>create_job</strong>(job) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new job in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 19 20 21 22 23 24 25</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/jobs.rb', line 19</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_job'>create_job</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='rparen'>)</span> <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='const'>Job</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>new</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_job'>job</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='const'>Status</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>open</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jobs</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_label-instance_method"> - (<tt>Object</tt>) <strong>create_label</strong>(label) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new label in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 20 21 22 23</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/labels.rb', line 20</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_label'>create_label</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='id identifier rubyid_label'>label</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>labels</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_server-instance_method"> - (<tt>Object</tt>) <strong>create_server</strong>(server) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new server in the system based on the Server instance</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 19 20 21 22</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/servers.rb', line 19</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_server'>create_server</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>servers</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_stream-instance_method"> - (<tt>Object</tt>) <strong>create_stream</strong>(stream) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new stream in the system based on the Stream instance</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 21 22 23 24</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/streams.rb', line 21</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_stream'>create_stream</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>streams</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="create_user-instance_method"> - (<tt>Object</tt>) <strong>create_user</strong>(user) </h3><div class="docstring"> <div class="discussion"> <p>Creates a new user in the system based on the User instance</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 19 20 21 22</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/users.rb', line 19</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_user'>create_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>users</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_branch-instance_method"> - (<tt>Object</tt>) <strong>delete_branch</strong>(branch) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the branch specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 35 36 37 38 39</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/branches.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_branch'>delete_branch</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='id identifier rubyid_branch'>branch</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_branch'>branch</span> <span class='kw'>unless</span> <span class='id identifier rubyid_branch'>branch</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>branches/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_client-instance_method"> - (<tt>Object</tt>) <strong>delete_client</strong>(client) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the client specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 34 35 36 37 38</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/clients.rb', line 34</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_client'>delete_client</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span> <span class='kw'>unless</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clients/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_counter-instance_method"> - (<tt>Object</tt>) <strong>delete_counter</strong>(counter) </h3><div class="docstring"> <div class="discussion"> <p>Delete the counter</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>counter</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The counter ID</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 37 38 39</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/counters.rb', line 37</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_counter'>delete_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>counters/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_depot-instance_method"> - (<tt>Object</tt>) <strong>delete_depot</strong>(depot) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the depot specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 33 34 35 36</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/depots.rb', line 33</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_depot'>delete_depot</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='id identifier rubyid_depot'>depot</span> <span class='op'>=</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_depot'>depot</span> <span class='kw'>if</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>depots/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_file-instance_method"> - (<tt>Object</tt>) <strong>delete_file</strong>(path) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 106 107 108 109</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/files.rb', line 106</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_file'>delete_file</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_encode_path'>encode_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>files/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_group-instance_method"> - (<tt>Object</tt>) <strong>delete_group</strong>(group) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the group specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 33 34 35 36</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/groups.rb', line 33</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_group'>delete_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_group'>group</span> <span class='kw'>if</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>groups/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_job-instance_method"> - (<tt>Object</tt>) <strong>delete_job</strong>(job_id) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the job specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 35 36 37</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/jobs.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_job'>delete_job</span><span class='lparen'>(</span><span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>jobs/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_label-instance_method"> - (<tt>Object</tt>) <strong>delete_label</strong>(label) </h3><div class="docstring"> <div class="discussion"> <p>Deletes the label specification in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 33 34 35 36</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/labels.rb', line 33</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_label'>delete_label</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='id identifier rubyid_label'>label</span> <span class='op'>=</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span> <span class='kw'>if</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>labels/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_server-instance_method"> - (<tt>Object</tt>) <strong>delete_server</strong>(server) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 31 32 33 34</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/servers.rb', line 31</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_server'>delete_server</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_server_id'>server_id</span> <span class='kw'>if</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>servers/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_stream-instance_method"> - (<tt>Object</tt>) <strong>delete_stream</strong>(stream) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 32 33 34 35</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/streams.rb', line 32</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_stream'>delete_stream</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_stream'>stream</span> <span class='kw'>if</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>streams/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="delete_user-instance_method"> - (<tt>Object</tt>) <strong>delete_user</strong>(user) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 30 31 32 33</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/users.rb', line 30</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_user'>delete_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span> <span class='kw'>if</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>users/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="depot-instance_method"> - (<tt>Object</tt>) <strong>depot</strong>(depot) </h3><div class="docstring"> <div class="discussion"> <p>Returns the depot instance indicated by the depot name (or depot object)</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 13 14 15 16 17</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/depots.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_depot'>depot</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='id identifier rubyid_depot'>depot</span> <span class='op'>=</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_depot'>depot</span> <span class='kw'>if</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>depots/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="depots-instance_method"> - (<tt>Object</tt>) <strong>depots</strong> </h3><div class="docstring"> <div class="discussion"> <p>Array of Depot objects stored in the system. Not all fields will be filled out (e.g., view).</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 7 8 9 10</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/depots.rb', line 7</span> <span class='kw'>def</span> <span class='id identifier rubyid_depots'>depots</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>depots</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="execute_method_no_body-instance_method"> - (<tt>Object</tt>) <strong>execute_method_no_body</strong>(method, path, params = nil) </h3><div class="docstring"> <div class="discussion"> <p>Runs the method against Helix Web Services, checks for errors, then parses the JSON response.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>method</span> <span class='type'>(<tt>Symbol</tt>)</span> — <div class='inline'> <p>HTTP method, for example, :get, :post, :delete</p> </div> </li> <li> <span class='name'>path</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>URL path part (no URI parameters) for the method</p> </div> </li> <li> <span class='name'>params</span> <span class='type'>(<tt>Hash</tt>)</span> <em class="default">(defaults to: <tt>nil</tt>)</em> — <div class='inline'> <p>URI parameters to send in</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 148 149 150 151</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 148</span> <span class='kw'>def</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_run_method_no_body'>run_method_no_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="execute_method_with_body-instance_method"> - (<tt>Object</tt>) <strong>execute_method_with_body</strong>(method, path, params = nil, body = nil) </h3><div class="docstring"> <div class="discussion"> <p>Runs the method against Helix Web Services, checks for errors, then parses the JSON response.</p> <p>This variation will send the body (expected to be a Hash) as JSON to the server.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>method</span> <span class='type'>(<tt>Symbol</tt>)</span> — <div class='inline'> <p>HTTP method, for example, :get, :post, :delete</p> </div> </li> <li> <span class='name'>path</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>URL path part (no URI parameters) for the method</p> </div> </li> <li> <span class='name'>params</span> <span class='type'>(<tt>Hash</tt>)</span> <em class="default">(defaults to: <tt>nil</tt>)</em> — <div class='inline'> <p>URI parameters to send in</p> </div> </li> <li> <span class='name'>body</span> <span class='type'>(<tt>Hash</tt>)</span> <em class="default">(defaults to: <tt>nil</tt>)</em> — <div class='inline'> <p>The Request content (which will be converted to JSON)</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 163 164 165 166</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 163</span> <span class='kw'>def</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_run_method_with_body'>run_method_with_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="fetch_helix_sync_latest_changelist-instance_method"> - (<tt>Object</tt>) <strong>fetch_helix_sync_latest_changelist</strong>(project_id) </h3><div class="docstring"> <div class="discussion"> <p>Retrieve the latest changelist.</p> <p>If the change doesn't exist, you'll get a ResourceNotFound exception.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 35 36 37 38</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/helix_sync.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_helix_sync_latest_changelist'>fetch_helix_sync_latest_changelist</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/helix_sync/v1/changes/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="fetch_helix_sync_pending_changelist-instance_method"> - (<tt>Object</tt>) <strong>fetch_helix_sync_pending_changelist</strong>(project_id) </h3><div class="docstring"> <div class="discussion"> <p>Retrieve the pending changelist.</p> <p>If the change doesn't exist, you'll get a ResourceNotFound exception.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 43 44 45 46</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/helix_sync.rb', line 43</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_helix_sync_pending_changelist'>fetch_helix_sync_pending_changelist</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/helix_sync/v1/changes/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/pending</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="file-instance_method"> - (<tt>Object</tt>) <strong>file</strong>(path) </h3><div class="docstring"> <div class="discussion"> <p>Returns the file metadata at this location, with the <code>content</code> field filled out.</p> <p>If path happens to be a directory, this method is synonymous with the files() method.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 48 49 50</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/files.rb', line 48</span> <span class='kw'>def</span> <span class='id identifier rubyid_file'>file</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_files'>files</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="files-instance_method"> - (<tt>Object</tt>) <strong>files</strong>(path = '') </h3><div class="docstring"> <div class="discussion"> <p>General file browsing method.</p> <p>The <code>path</code> parameter should be a directory location, starting with a depot location, e.g., <code>my_depot/dir1</code>.</p> <p>When path is empty, will return the list of depots.</p> <p>Note: if path happens to be a file, instead of a directory, this is a synonym with the file() method.</p> <p>If the path contains wildcards, the return will only be the list of HelixWebServicesClient::Models::File instances.</p> <p>See also the HelixWebServicesClient::Models::File, HelixWebServicesClient::Models::Dir, and HelixWebServicesClient::Models::Depot for the output types.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/files.rb', line 21</span> <span class='kw'>def</span> <span class='id identifier rubyid_files'>files</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_wildcards?'>wildcards?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>files</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>files/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>if</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>else</span> <span class='id identifier rubyid_m'>m</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_arr'>arr</span><span class='rparen'>)</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='const'>Content</span> <span class='op'>=</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_decode64'>decode64</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span> <span class='id identifier rubyid_m'>m</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="group-instance_method"> - (<tt>Object</tt>) <strong>group</strong>(group) </h3><div class="docstring"> <div class="discussion"> <p>Returns the group instance indicated by the group name (or group object)</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 13 14 15 16 17</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/groups.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_group'>group</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_group'>group</span> <span class='kw'>if</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>groups/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="groups-instance_method"> - (<tt>Object</tt>) <strong>groups</strong> </h3><div class="docstring"> <div class="discussion"> <p>Array of Group objects stored in the system. Not all fields will be filled out (e.g., view).</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 7 8 9 10</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/groups.rb', line 7</span> <span class='kw'>def</span> <span class='id identifier rubyid_groups'>groups</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>groups</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="hve_path-instance_method"> - (<tt>Object</tt>) <strong>hve_path</strong>(subpath) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 228 229 230</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 228</span> <span class='kw'>def</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='id identifier rubyid_subpath'>subpath</span><span class='rparen'>)</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/helix_versioning_engine/v</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_api_level'>api_level</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_subpath'>subpath</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="increment_counter-instance_method"> - (<tt>Object</tt>) <strong>increment_counter</strong>(counter) </h3><div class="docstring"> <div class="discussion"> <p>Increment the value of a numerical counter</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>counter</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The counter ID</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 22 23 24</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/counters.rb', line 22</span> <span class='kw'>def</span> <span class='id identifier rubyid_increment_counter'>increment_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>counters/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/increment</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="job-instance_method"> - (<tt>Object</tt>) <strong>job</strong>(job_id) </h3><div class="docstring"> <div class="discussion"> <p>Returns the array of jobs in the system. Each job model is simply a hash of string -> string values, since each system can very likely adjust job output.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/jobs.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_job'>job</span><span class='lparen'>(</span><span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>jobs/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_job_id'>job_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="jobs-instance_method"> - (<tt>Object</tt>) <strong>jobs</strong> </h3><table class="source_code"> <tr> <td> <pre class="lines"> 5 6 7 8</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/jobs.rb', line 5</span> <span class='kw'>def</span> <span class='id identifier rubyid_jobs'>jobs</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>jobs</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="label-instance_method"> - (<tt>Object</tt>) <strong>label</strong>(label) </h3><div class="docstring"> <div class="discussion"> <p>Returns the label instance indicated by the label name (or label object)</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 13 14 15 16 17</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/labels.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_label'>label</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='id identifier rubyid_label'>label</span> <span class='op'>=</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span> <span class='kw'>if</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>labels/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="labels-instance_method"> - (<tt>Object</tt>) <strong>labels</strong> </h3><div class="docstring"> <div class="discussion"> <p>Array of Label objects stored in the system. Not all fields will be filled out (e.g., view).</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 7 8 9 10</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/labels.rb', line 7</span> <span class='kw'>def</span> <span class='id identifier rubyid_labels'>labels</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>labels</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="login-instance_method"> - (<tt>Object</tt>) <strong>login</strong>(user, password) </h3><div class="docstring"> <div class="discussion"> <p>Generates a host unlocked ticket for the user.</p> <p>In some installations, such as Helix Cloud, the authentication source is not the p4d instance used for connections. This allows you to generate p4 ticket which should then be passed along as the P4PASSWD per-request header.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>user</span> <span class='type'>(<tt>String</tt>)</span> </li> <li> <span class='name'>password</span> <span class='type'>(<tt>String</tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 11 12 13 14 15</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/login.rb', line 11</span> <span class='kw'>def</span> <span class='id identifier rubyid_login'>login</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>login</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_password'>password</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ticket</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="p4_ticket?-instance_method"> - (<tt>Boolean</tt>) <strong>p4_ticket?</strong>(str) </h3><div class="docstring"> <div class="discussion"> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Boolean</tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 138 139 140</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 138</span> <span class='kw'>def</span> <span class='id identifier rubyid_p4_ticket?'>p4_ticket?</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[a-zA-Z0-9]{32,}$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="path_for-instance_method"> - (<tt>Object</tt>) <strong>path_for</strong>(subpath) </h3><div class="docstring"> <div class="discussion"> <p>Basically just prepends the prefix to our subpath, typically, '/p4'.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 196 197 198 199 200 201 202 203 204</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 196</span> <span class='kw'>def</span> <span class='id identifier rubyid_path_for'>path_for</span><span class='lparen'>(</span><span class='id identifier rubyid_subpath'>subpath</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@prefix</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='ivar'>@prefix</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='id identifier rubyid_subpath'>subpath</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_subpath'>subpath</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_subpath'>subpath</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='ivar'>@prefix</span> <span class='kw'>else</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='ivar'>@prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_subpath'>subpath</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="project-instance_method"> - (<tt>Object</tt>) <strong>project</strong>(project_id) </h3><div class="docstring"> <div class="discussion"> <p>Return the project details</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>project_id</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>The project's String id</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 23 24 25 26 27</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/projects.rb', line 23</span> <span class='kw'>def</span> <span class='id identifier rubyid_project'>project</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/projects/v1/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="projects-instance_method"> - (<tt>Object</tt>) <strong>projects</strong>(details: nil, extension: nil) </h3><div class="docstring"> <div class="discussion"> <p>Lists the projects available on the server for the user.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>details</span> <span class='type'>(<tt>Boolean</tt>)</span> — <div class='inline'> <p>Defaults to false, if true, output will be an array of project details. If false, output will be an array of project IDs.</p> </div> </li> <li> <span class='name'>extension</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>If set, will only return projects with the indicated extension ID.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 11 12 13 14 15 16 17 18</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/projects.rb', line 11</span> <span class='kw'>def</span> <span class='id identifier rubyid_projects'>projects</span><span class='lparen'>(</span><span class='label'>details:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>extension:</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='id identifier rubyid_query'>query</span><span class='lbracket'>[</span><span class='symbol'>:details</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_details'>details</span> <span class='kw'>if</span> <span class='id identifier rubyid_details'>details</span> <span class='id identifier rubyid_query'>query</span><span class='lbracket'>[</span><span class='symbol'>:extension</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_extension'>extension</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension'>extension</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/projects/v1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_details'>details</span> <span class='id identifier rubyid_arr'>arr</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="protections-instance_method"> - (<tt>Object</tt>) <strong>protections</strong> </h3><div class="docstring"> <div class="discussion"> <p>Fetch all protections in the system. Returns a single Protections instance.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/protections.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_protections'>protections</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>protections</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="remove_setting-instance_method"> - (<tt>Object</tt>) <strong>remove_setting</strong>(key) </h3><div class="docstring"> <div class="discussion"> <p>Remove a setting added via add_setting</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 112 113 114</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 112</span> <span class='kw'>def</span> <span class='id identifier rubyid_remove_setting'>remove_setting</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Perforce-Helix-Web-Services-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="run_method_no_body-instance_method"> - (<tt>Object</tt>) <strong>run_method_no_body</strong>(method, path, params = nil) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 168 169 170 171 172 173 174</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 168</span> <span class='kw'>def</span> <span class='id identifier rubyid_run_method_no_body'>run_method_no_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path_for'>path_for</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> <span class='id identifier rubyid_assert_ok'>assert_ok</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="run_method_with_body-instance_method"> - (<tt>Object</tt>) <strong>run_method_with_body</strong>(method, path, params = nil, body = nil) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 176</span> <span class='kw'>def</span> <span class='id identifier rubyid_run_method_with_body'>run_method_with_body</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_body'>body</span> <span class='op'>&&</span> <span class='id identifier rubyid_params'>params</span> <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>end</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path_for'>path_for</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span> <span class='id identifier rubyid_params_hash'>params_hash</span> <span class='op'>=</span> <span class='const'>Faraday</span><span class='op'>::</span><span class='const'>Utils</span><span class='op'>::</span><span class='const'>ParamsHash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_params_hash'>params_hash</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>?</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_params_hash'>params_hash</span><span class='period'>.</span><span class='id identifier rubyid_to_query'>to_query</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='id identifier rubyid_assert_ok'>assert_ok</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="server-instance_method"> - (<tt>Object</tt>) <strong>server</strong>(server) </h3><div class="docstring"> <div class="discussion"> <p>Returns a HelixWebServicesClient::OpenModel for the login</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 12 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/servers.rb', line 12</span> <span class='kw'>def</span> <span class='id identifier rubyid_server'>server</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='const'>ServerID</span> <span class='kw'>if</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>servers/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="servers-instance_method"> - (<tt>Object</tt>) <strong>servers</strong> </h3><div class="docstring"> <div class="discussion"> <p>Returns an array of Server objects representing people in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/servers.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_servers'>servers</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>servers</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_obj'>obj</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="services-instance_method"> - (<tt>Object</tt>) <strong>services</strong> </h3><div class="docstring"> <div class="discussion"> <p>Returns an array of all service definitions in the system. Each definition is a hash with <code>type</code> and <code>uri</code> values.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 8 9 10</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/config.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_services'>services</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/config/v1/services</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="set_auth-instance_method"> - (<tt>Object</tt>) <strong>set_auth</strong>(user, token) </h3><div class="docstring"> <div class="discussion"> <p>Note: this class is really just common implementation. Methods are generally defined in other files that reopen this class.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 134 135 136</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 134</span> <span class='kw'>def</span> <span class='id identifier rubyid_set_auth'>set_auth</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span> <span class='ivar'>@conn</span><span class='period'>.</span><span class='id identifier rubyid_basic_auth'>basic_auth</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="set_counter-instance_method"> - (<tt>Object</tt>) <strong>set_counter</strong>(counter) </h3><div class="docstring"> <div class="discussion"> <p>Set the counter value</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>counter</span> <span class='type'>(<tt>Hash|<span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>)</span> — <div class='inline'> <p>A has containing <code>counter</code> and <code>value</code> properties</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 29 30 31 32</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/counters.rb', line 29</span> <span class='kw'>def</span> <span class='id identifier rubyid_set_counter'>set_counter</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span> <span class='id identifier rubyid_counter'>counter</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_counter'>counter</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>counters/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_counter'>counter</span><span class='period'>.</span><span class='id identifier rubyid_counter'>counter</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_counter'>counter</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="stream-instance_method"> - (<tt>Object</tt>) <strong>stream</strong>(stream) </h3><div class="docstring"> <div class="discussion"> <p>Fetch single stream details</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'></span> <div class='inline'> <p>An OpenModel wrapper around the stream data</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 14 15 16 17 18</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/streams.rb', line 14</span> <span class='kw'>def</span> <span class='id identifier rubyid_stream'>stream</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_stream'>stream</span> <span class='kw'>if</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>streams/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="streams-instance_method"> - (<tt>Object</tt>) <strong>streams</strong> </h3><div class="docstring"> <div class="discussion"> <p>Returns an array of Stream objects representing people in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/streams.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_streams'>streams</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>streams</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_obj'>obj</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="submit_helix_sync_pending_change-instance_method"> - (<tt>Object</tt>) <strong>submit_helix_sync_pending_change</strong>(project_id) </h3><div class="docstring"> <div class="discussion"> <p>Submits the pending changelist for the helix sync project.</p> <p>Currently this assumes that all files are shelved and nothing's open on the client. This is likely not what we want … but it's a start.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>project_id</span> <span class='type'>(<tt>String</tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 54 55 56 57</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/helix_sync.rb', line 54</span> <span class='kw'>def</span> <span class='id identifier rubyid_submit_helix_sync_pending_change'>submit_helix_sync_pending_change</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/helix_sync/v1/changes/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_project_id'>project_id</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/pending</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="triggers-instance_method"> - (<tt><span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>) <strong>triggers</strong> </h3><div class="docstring"> <div class="discussion"> <p>Fetch the list of trigger lines in the system.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt><span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>)</span> — <div class='inline'> <p>A hash with a <code>Triggers</code> property that is an array of lines in the triggers table.</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 8 9 10 11</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/triggers.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_triggers'>triggers</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>triggers</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_branch-instance_method"> - (<tt>Object</tt>) <strong>update_branch</strong>(branch) </h3><div class="docstring"> <div class="discussion"> <p>Updates the branch specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 27 28 29 30 31 32</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/branches.rb', line 27</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_branch'>update_branch</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='id identifier rubyid_branch'>branch</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_branch'>branch</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>branches/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_branch'>branch</span><span class='period'>.</span><span class='id identifier rubyid_branch'>branch</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_branch'>branch</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_client-instance_method"> - (<tt>Object</tt>) <strong>update_client</strong>(client) </h3><div class="docstring"> <div class="discussion"> <p>Updates the client specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28 29 30 31</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/clients.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_client'>update_client</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clients/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_depot-instance_method"> - (<tt>Object</tt>) <strong>update_depot</strong>(depot) </h3><div class="docstring"> <div class="discussion"> <p>Updates the depot specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28 29 30</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/depots.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_depot'>update_depot</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='id identifier rubyid_depot'>depot</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>depots/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_depot'>depot</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_depot'>depot</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_group-instance_method"> - (<tt>Object</tt>) <strong>update_group</strong>(group) </h3><div class="docstring"> <div class="discussion"> <p>Updates the group specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28 29 30</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/groups.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_group'>update_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='id identifier rubyid_group'>group</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>groups/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_group'>group</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_job-instance_method"> - (<tt>Object</tt>) <strong>update_job</strong>(job) </h3><div class="docstring"> <div class="discussion"> <p>Updates the job specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 28 29 30 31 32</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/jobs.rb', line 28</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_job'>update_job</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='rparen'>)</span> <span class='id identifier rubyid_job'>job</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>jobs/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Job</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_job'>job</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_label-instance_method"> - (<tt>Object</tt>) <strong>update_label</strong>(label) </h3><div class="docstring"> <div class="discussion"> <p>Updates the label specification.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28 29 30</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/labels.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_label'>update_label</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='id identifier rubyid_label'>label</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>labels/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_protections-instance_method"> - (<tt>Object</tt>) <strong>update_protections</strong>(protections) </h3><div class="docstring"> <div class="discussion"> <p>Updates the protections table based on the Protections instance passed in</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>protections</span> <span class='type'>(<tt>Hash|<span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>)</span> — <div class='inline'> <p>A hash with a <code>protections</code> property that is an Array of protections entries</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 15 16 17 18 19</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/protections.rb', line 15</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_protections'>update_protections</span><span class='lparen'>(</span><span class='id identifier rubyid_protections'>protections</span><span class='rparen'>)</span> <span class='id identifier rubyid_protections'>protections</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_protections'>protections</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_protections'>protections</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>protections</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_protections'>protections</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_server-instance_method"> - (<tt>Object</tt>) <strong>update_server</strong>(server) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 24 25 26 27 28 29</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/servers.rb', line 24</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_server'>update_server</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>servers/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='const'>ServerID</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_server'>server</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_stream-instance_method"> - (<tt>Object</tt>) <strong>update_stream</strong>(stream) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 26 27 28 29 30</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/streams.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_stream'>update_stream</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='id identifier rubyid_stream'>stream</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>streams/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_stream'>stream</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_stream'>stream</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_triggers-instance_method"> - (<tt>Object</tt>) <strong>update_triggers</strong>(triggers) </h3><div class="docstring"> <div class="discussion"> <p>Update the triggers table using the Triggers model instance</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>triggers</span> <span class='type'>(<tt>Hash|<span class='object_link'><a href="OpenModel.html" title="OpenModel (class)">OpenModel</a></span></tt>)</span> — <div class='inline'> <p>A hash with a <code>Triggers</code> property</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 16 17 18 19</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/triggers.rb', line 16</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_triggers'>update_triggers</span><span class='lparen'>(</span><span class='id identifier rubyid_triggers'>triggers</span><span class='rparen'>)</span> <span class='id identifier rubyid_triggers'>triggers</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_triggers'>triggers</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_triggers'>triggers</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>triggers</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_triggers'>triggers</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="update_user-instance_method"> - (<tt>Object</tt>) <strong>update_user</strong>(user) </h3><table class="source_code"> <tr> <td> <pre class="lines"> 24 25 26 27 28</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/users.rb', line 24</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_user'>update_user</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>users/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_marshal_dump'>marshal_dump</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="upload_file-instance_method"> - (<tt>Object</tt>) <strong>upload_file</strong>(file) </h3><div class="docstring"> <div class="discussion"> <p>Upload a single file's content.</p> <p>The <code>file</code> hash should contain the following fields:</p> <ul><li> <p><code>DepotFile</code>: target depot path</p> </li><li> <p><code>Content</code>: file content</p> </li></ul> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>file</span> <span class='type'>(<tt>Hash</tt>)</span> — <div class='inline'> <p>See description</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 60 61 62 63 64 65 66 67 68 69 70 71</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/files.rb', line 60</span> <span class='kw'>def</span> <span class='id identifier rubyid_upload_file'>upload_file</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span> <span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_encode_path'>encode_path</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_depot_file'>depot_file</span><span class='rparen'>)</span> <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DepotFile</span><span class='label_end'>':</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_depot_file'>depot_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content</span><span class='label_end'>':</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_encode64'>encode64</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>files/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="upload_files-instance_method"> - (<tt>Object</tt>) <strong>upload_files</strong>(files: [], path: nil, description: nil) </h3><div class="docstring"> <div class="discussion"> <p>Upload multiple files</p> <p>Each file in the <code>Files</code> array should have two fields</p> <ul><li> <p><code>DepotFile</code>: target path, can be relative if <code>path</code> is indicated</p> </li><li> <p><code>Content</code>: File content</p> </li></ul> <p>The optional <code>path</code> parameter can indicate the root directory for all files.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>files</span> <span class='type'>(<tt>Array</tt>)</span> — <div class='inline'> <p>See description</p> </div> </li> <li> <span class='name'>path</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>If set, the root directory for all files</p> </div> </li> <li> <span class='name'>description</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'> <p>Informative message about the change</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/files.rb', line 86</span> <span class='kw'>def</span> <span class='id identifier rubyid_upload_files'>upload_files</span><span class='lparen'>(</span><span class='label'>files:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>description:</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>?</span> <span class='id identifier rubyid_encode_path'>encode_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Files</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DepotFile</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_depot_file'>depot_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_encode64'>encode64</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span> <span class='rbrace'>}</span> <span class='id identifier rubyid_obj'>obj</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Description</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_description'>description</span> <span class='kw'>if</span> <span class='id identifier rubyid_description'>description</span> <span class='id identifier rubyid_execute_method_with_body'>execute_method_with_body</span><span class='lparen'>(</span><span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>files/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="user_details-instance_method"> - (<tt>Object</tt>) <strong>user_details</strong>(user) </h3><div class="docstring"> <div class="discussion"> <p>Returns a HelixWebServicesClient::OpenModel for the login</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 12 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/users.rb', line 12</span> <span class='kw'>def</span> <span class='id identifier rubyid_user_details'>user_details</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span> <span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span> <span class='kw'>if</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenModel</span><span class='rparen'>)</span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>users/</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="users-instance_method"> - (<tt>Object</tt>) <strong>users</strong> </h3><div class="docstring"> <div class="discussion"> <p>Returns an array of User objects representing people in the system.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 6 7 8 9</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client/users.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_users'>users</span> <span class='id identifier rubyid_arr'>arr</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_method_no_body'>execute_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_hve_path'>hve_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>users</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_arr'>arr</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_obj'>obj</span><span class='op'>|</span> <span class='const'>OpenModel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="version-instance_method"> - (<tt>Object</tt>) <strong>version</strong> </h3><div class="docstring"> <div class="discussion"> <p>Return the product version ID of the Helix Web Services instance</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 233 234 235 236</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/helix_web_services_client.rb', line 233</span> <span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span> <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_run_method_no_body'>run_method_no_body</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/status</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>X-Helix-Web-Services-Version</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Tue Sep 15 01:20:25 2015 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.7.6 (ruby-2.2.3). </div> </body> </html>