Class: Substance

Ambit. Substance

new Substance(baseURL)

Parameters:
Name Type Description
baseURL string URL for the AMBIT API
Author:
  • Egon Willighagen
License:
Source:

Methods

composition(uri, callback)

Returns the chemical composition of the substance.
Parameters:
Name Type Description
uri string The URI for the substance
callback requestCallback Function that will be called with the result.
Source:

compositionAsList(uri, callback)

Returns the chemical composition of the substance as a list.
Parameters:
Name Type Description
uri string The URI for the substance
callback requestCallback Function that will be called with the result.
Source:

info(uri, callback)

Returns information about a single substance.
Parameters:
Name Type Description
uri string The URI for the substance
callback requestCallback Function that will be called with the result.
Source:

list(callback)

Lists all the substances.
Parameters:
Name Type Description
callback requestCallback Function that will be called with the result.
Source:
Search for substances.
Parameters:
Name Type Description
query string The search query
type string The search type (e.g. name, citation, ownerName)
callback requestCallback Function that will be called with the result.
Source:

summary(uri, callback)

Summarizes the information about a single substance.
Parameters:
Name Type Description
uri string The URI for the substance
callback requestCallback Function that will be called with the result.
Source: