Function: getChannels()
getChannels(
directory): (options?) =>Promise<Channel[]>
Defined in: channels.ts:52
Returns all channels from EventCatalog.
You can optionally specify if you want to get the latest version of the channels.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
options? | { latestOnly: boolean; } |
options.latestOnly? | boolean |
Returns
Promise<Channel[]>
Example
import utils from '@eventcatalog/utils';
const { getChannels } = utils('/path/to/eventcatalog');
// Gets all channels (and versions) from the catalog
const channels = await getChannels();
// Gets all channels (only latest version) from the catalog
const channels = await getChannels({ latestOnly: true });