Namespace: Psynth

Psynth

Source:

Classes

Detail
Graph
Link
LinkType
Node

Methods

<static> createGraph(params, handler)

Creates a new Graph, and returns it to a callback function.
Parameters:
Name Type Description
params object
Properties
Name Type Description
url string The base URL for your Psynth server. e.g. https://psynth.psymphonic.com/
username string Your Psynth username.
key string Your Psynth api key.
name string The name of the the new Graph.
handler function A callback function that will receive the Graph when it is returned from the server.
Source:
Example
var graphParameters = {name: 'test map',username: 'myusername',
                       key: 'mykey', url: 'https://psynth.psymphonic.com/'};
function MyFunction(graph){
     //your code
}
Psynth.createGraph(graphParameters, MyFunction);

<static> loadGraph(params, handler)

Loads a Graph by filename, and returns it to a callback function.
Parameters:
Name Type Description
params
Properties
Name Type Description
url string The base URL for your Psynth server. e.g. https://psynth.psymphonic.com/
username string Your Psynth username.
key string Your Psynth api key.
filename string The filename of the the Graph to load.
handler function A callback function that will receive the Graph when it is returned from the server.
Source:
Example
var graphParameters = {filename: 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.gt',username: 'myusername',
                       key: 'mykey', url: 'https://psynth.psymphonic.com/'};
function MyFunction(graph){
     //your code
}
Psynth.loadGraph(graphParameters, MyFunction);

<static> UID() → {string}

Returns a global unique identifier of format 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
Source:
Returns:
Type
string
Example
var uid = p().UID();
//uid === 'b8e1241a-c90c-46ca-a55e-6cbb9145ab19'