getRules

You can get a list of all your previously created rules-sets via the getRules method provided by the DanubeClient class.

Method

Below, the method's header is shown, as it is provided by DanubeClient.

/*
 * Gets all set of rules which have been saved for this API-key.
 *
 * @returns a list of set of rules.
 */
public async getRules(): Promise<RULES_SET[]> {
  ...
}

/*
 * A set of rules defined by an id and containing a list of rules.
 *
 * @field id: An id of this rules-set.
 * @field rules: A list of rules.
 */
export interface RULES_SET {
  id: string;
  rules: RULE[];
}

A RULES_SET contains the id it was saved with and a list of rules. See setRules for possible RULE types.