Class: HelixWebServicesClient

HelixWebServicesClient

new HelixWebServicesClient(options)

Create the main client object used to communicate via remote calls.

Parameters:
Name Type Description
options Object

Set various properties on this object.

Source:

Members

prefix :string

If accessing an HWS instance behind a proxy, it's probably available underneath a subdirectory

Type:
  • string
Source:

session_token :string

Set a security token if you know it. This is used for authenticated methods.

Type:
  • string
Source:

url :string

The base URL, e.g. http://example.com of the web server.

Type:
  • string
Source:

user :string

The Perforce user name.

Type:
  • string
Source:

Methods

createSyncProject(project) → {Promise.<Project>|Promise.<jqXHR, String, error>}

Create a new Helix Sync project.

Parameters:
Name Type Description
project Object | Project
Source:
Returns:

Will return the 'updated' project structure, which likely has several default configuration values set.

Type
Promise.<Project> | Promise.<jqXHR, String, error>

listAllSyncProjects() → {*|Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}

List all Helix Sync projects on the server.

Source:
Returns:
Type
* | Promise.<Array.<Project>> | Promise.<jqXHR, textStatus, error>

listFiles(path) → {Promise.<Array.<PathItem>>|Promise.<jqXHR, String, error>}

List files at the particular directory level.

Parameters:
Name Type Description
path String

The directory to list. Should be an absolute depot path, e.g., //depot/dirA. When empty, this lists depots in the system.

Source:
Returns:

Promises resolve to a list of PathItem models or the error data. Each PathItem is either all depot paths (if path is empty) or the child Directory or Files of path.

Type
Promise.<Array.<PathItem>> | Promise.<jqXHR, String, error>

listMySyncProjects() → {*|Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}

List the Helix Sync projects the current user is a member of.

Source:
Returns:
Type
* | Promise.<Array.<Project>> | Promise.<jqXHR, textStatus, error>

logIn(useropt, password) → {Promise.<String>|Promise.<jqXHR, String, error>}

Creates a new session token by logging into the server.

Parameters:
Name Type Attributes Description
user String <optional>

Optional attribute. If you specify it, we'll cache it as the user property.

password String

Required Perforce password for the user.

Source:
Returns:

On success, you'll receive the security token, which will be cached on this client object as the session_token property.

Type
Promise.<String> | Promise.<jqXHR, String, error>

logOut() → {Promise|Promise.<jqXHR, textStatus, error>}

Destroys the session (on the server)

Source:
Returns:
Type
Promise | Promise.<jqXHR, textStatus, error>

syncProjects(optionsopt) → {Promise.<Array.<Project>>|Promise.<jqXHR, textStatus, error>}

Fetch a listing of Helix Sync projects from the server.

Parameters:
Name Type Attributes Description
options Object <optional>

Set 'listType'

Source:
Returns:
Type
Promise.<Array.<Project>> | Promise.<jqXHR, textStatus, error>