treeclient~TreeClient(hostname, port, api_version)

new TreeClient(hostname, port, api_version)

Parameters:
Name Type Default Description
hostname string localhost the hostname flex listens on
port number 31416 the port that flex listens on
api_version number 1 the api version that should be used

Methods

branchMediaRepository(name, branch, callback)

Switches to the given branch of the media repository with the given name. If the media repository is a git repository a 'git pull' is performed.
Parameters:
Name Type Description
name string The name of the media repository.
branch string The name of the branch to switch to.
callback function

callEndpoint(methodName, callback, path, data)

Calls an endpoint
Parameters:
Name Type Description
methodName string the method name to be called
callback function the callback to be feeded with data
path string the path to call
data mixed the data to supply to the endpoint

clientWindowFullscreen(id, mode, callback)

Sets the instance (client) to specified window mode.
Parameters:
Name Type Description
id number
mode string
callback function

clientWindowMaximize(id, callback)

Maximies the window for given client instance
Parameters:
Name Type Description
id number
callback function

clientWindowMinimize(id, callback)

Minimizes the window for given client instance
Parameters:
Name Type Description
id number
callback function

clientWindowRestore(id, callback)

Restores the window for a given client instance
Parameters:
Name Type Description
id number
callback function

connectInstance(id, callback)

Connects an instance to it's core
Parameters:
Name Type Description
id number
callback function

createEndpoint(url, methodName, httpMethod)

Creates an endpoint within the Inexor Tree Client
Parameters:
Name Type Default Description
url string the url
methodName string the name of the method to be called
httpMethod httpMethod GET the http method to be used

createInstance(id, type, name, description, persistent, autostart, autoconnect, autorestart, callback)

Creates an instance
Parameters:
Name Type Description
id number the instance id
type string the type of the instance: either 'server' or 'client'
name string the name of the instance
description string the description of the instance
persistent boolean True, if the instance should be persisted.
autostart boolean True, if the instance should be started automatically on startup.
autoconnect boolean True, if the instance should be connected automatically on startup.
autorestart boolean True, if the instance should be restarted automatically after shutdown of the instance.
callback function

createMediaRepository(name, url, callback)

Creates a media repository with the given name and url.
Parameters:
Name Type Description
name string The name of the media repository.
url string The url of the media repository.
callback function

createProfile(name, hostname, port, callback)

Creates a profile.
Parameters:
Name Type Description
name string the name of the profile to create.
hostname string the hostname.
port number the port.
callback function

deleteTreeNode(id, path, callback)

Deletes a tree node.
Parameters:
Name Type Description
id number
path string
callback function

downloadRelease(versionRange, channel, callback)

Downloads the release
Parameters:
Name Type Description
versionRange string the release version range
channel string the release channel
callback function

dumpInstanceTree(id, callback)

Dumps the instance tree.
Parameters:
Name Type Description
id number
callback function

fetchReleases(callback)

Fetches all releases (to the callback)
Parameters:
Name Type Description
callback function

getAllInstances(callback)

Returns all the instances to the callback
Parameters:
Name Type Description
callback function

getEndpointUrl(relPath) → {string}

Gets an endpoint url's path
Parameters:
Name Type Description
relPath string the relative path to be looked up
Returns:
string

getFlexLog(name)

Get's flex log buffer
Parameters:
Name Type Default Description
name string flex.server.FlexServer the name of the log

getFlexSysInfo(callback)

Get's the flex sysinfo from the API
Parameters:
Name Type Description
callback function

getFlexVersion(callback)

Get's the flex version from the API
Parameters:
Name Type Description
callback function

getInstance(id, callback)

Returns the instances to the callback
Parameters:
Name Type Description
id number the instance id
callback function

getReleaseInfo(versionRange, channel, callback)

Get's a release info by semantic version range and release channel
Parameters:
Name Type Description
versionRange string the release version range
channel string the release channel
callback function

getTreeNode(id, path, callback)

Gets a tree node.
Parameters:
Name Type Description
id number
path string
callback function

installRelease(versionRange, channelSearch, callback)

Installs the release
Parameters:
Name Type Description
versionRange string the release version range
channelSearch string the release channel
callback function

listReleases(callback)

Returns all the releases to the callback
Parameters:
Name Type Description
callback function

loadReleases(callback)

Load the release config
Parameters:
Name Type Description
callback function

readHJsonConfig(path, callback)

Reads a HJson object using the @inexor-plugins/hjsonreader
Parameters:
Name Type Description
path string The path of the file to be read
callback function

readTOMLConfig(path, callback)

Reads a TOML object using the @inexor-plugins/tomlreader
Parameters:
Name Type Description
path string The path of the file to be read
callback function

removeInstance(id, callback)

Removes an instance
Parameters:
Name Type Description
id number
callback function

removeMediaRepository(name, path, callback)

Removes a media repository from the Inexor Tree.
Parameters:
Name Type Description
name string The name of the media repository.
path string The path to the media repository.
callback function

removeProfile(name, callback)

Removes a profile.
Parameters:
Name Type Description
name string the name of the profile to remove.
callback function

saveReleases(callback)

Saves the release config
Parameters:
Name Type Description
callback function

scanMediaRepositories(callback)

Scans for media repositories.
Parameters:
Name Type Description
callback function

setTreeNode(id, path, value, callback)

Sets a tree node.
Parameters:
Name Type Description
id number
path string
value string
callback function

shutdownFlex(callback)

Shuts down the flex server
Parameters:
Name Type Description
callback function

startAllInstances(callback)

Starts all available instances
Parameters:
Name Type Description
callback function

startInstance(id, callback)

Starts an instance
Parameters:
Name Type Description
id number
callback function

stopAllInstances(callback)

Stops all available instances
Parameters:
Name Type Description
callback function

stopInstance(id, callback)

Stops an instance
Parameters:
Name Type Description
id number
callback function

switchProfile(name, callback)

Switches to profile.
Parameters:
Name Type Description
name string the name of the profile.
callback function

synchronizeInstance(id, callback)

Synchronizes an instance with it's core
Parameters:
Name Type Description
id number
callback function

uninstallRelease(versionRange, channelSearch, callback)

Uninstalls the release
Parameters:
Name Type Description
versionRange string the release version range
channelSearch string the release channel
callback function

updateMediaRepository(name, callback)

Updates a media repository with the given name. If the media repository is a git repository a 'git pull' is performed.
Parameters:
Name Type Description
name string The name of the media repository.
callback function