getItemBySlug

Function

Get an item by searching for items with a typeKeyword like slug|{slug-value}

For example, if you pass a slug "snow-map" into this function, it will search for items with slug|snow-map in it's typeKeywords array. It also transforms uriSlugs into typeKeyword slugs by replacing :: with | Thus, passing a slug of "myorg::snow-map" would search for items with myorg|snow-map in it's typeKeywords array.

  • getItemBySlug(slug: string, requestOptions: IRequestOptions) : Promise<IItem>

Parameters

Parameter Type Default Notes
slug Required string
requestOptions Required IRequestOptions

Available requestOptions

Property Type Notes

Returns

Promise<IItem>
Property Type Notes

Function defined in common/src/items/slugs.ts:60