getMeasuresCatalogue
@nmi-agro/fdm-source / fdm-data/src / getMeasuresCatalogue
Function: getMeasuresCatalogue()
getMeasuresCatalogue(
catalogueName,nmiApiKey):Promise<CatalogueMeasure>
Defined in: fdm-data/src/measures/index.ts:22
Retrieves a measures catalogue based on the specified name.
This function acts as a dispatcher, selecting and returning the appropriate
measures catalogue based on the provided catalogueName.
Parameters
catalogueName
"bln"
The name of the desired measures catalogue. Currently
supported: "bln".
nmiApiKey
string
Bearer token for the NMI API (required for all current catalogues).
Returns
Promise<CatalogueMeasure>
A Promise that resolves to an array of CatalogueMeasureItem objects.
Throws
Throws an error if the provided catalogueName is not recognized.
Example
const blnCatalogue = await getMeasuresCatalogue("bln", apiKey)
console.log(blnCatalogue)