Constructor
new ActiveSubstancesResult(substances, error)
Creates a new ActiveSubstancesResult.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
substances |
Array.<SubstanceMetadata> | Array of substance metadata | |
error |
string | null | null | Error message or null if no error |
- Source:
Methods
getError() → {string|null}
Gets the error message if any.
- Source:
Returns:
Error message or null if no error
- Type
- string | null
getSubstances() → {Array.<SubstanceMetadata>}
Gets the array of substance metadata.
- Source:
Returns:
Array of substance metadata
- Type
- Array.<SubstanceMetadata>
hasError() → {boolean}
Checks if there was an error.
- Source:
Returns:
True if there was an error
- Type
- boolean