slycat-web-client

The slycat-web-client AMD module provides convenient Javascript bindings for the REST API, in a style similar to jquery.ajax().

For example, once the module has been imported into the current namespace:

require(["slycat-web-client"], function(client)
{
  // Use the module here
});

A model can be retrieved using:

client.get_model(
{
  mid: model_id, // Unique model identifier
  success: function(model)
  {
    // Do something with the model
  },
});
slycat-web-client.delete_model(params)

Delete an existing model.

Arguments:
  • params (object) –

    a set of key/value pairs that configure the request:

    • mid (string) - required, unique model identifier.
    • success (function) - optional, called when the request completes successfully.
    • error (function) - optional, called if the request fails.
      param request:
      param status:
      param reason_phrase:
       
slycat-web-client.delete_project(params)

Delete an existing project.

Arguments:
  • params (object) –

    a set of key/value pairs that configure the request:

    • pid (string) - required, unique project identifier.
    • success (function) - optional, called when the request completes successfully.
    • error (function) - optional, called if the request fails.