getModelBySlug

Function

Get a model by it's slug

This uses the Filter option of the to search for an item that has a typekeyword of slug|{slug-value}

This is useful for applications that want to use human-readable urls instead of using item ids.

  • getModelBySlug(slug: string, requestOptions: IRequestOptions) : Promise<IModel>

Parameters

Parameter Type Default Notes
slug Required string
requestOptions Required IRequestOptions

Available requestOptions

Property Type Notes

Returns

Promise<IModel>
Property Type Notes
item IItem
data Optional [key: string]: any

Function defined in common/src/models/index.ts:51