plugin.freshdesk

Contains functions for interacting with the freshdesk API and processing those responses.

Methods

async, static fetch(domain, user, pass) → {Array.<object>}

Fetches all the solution articles and forum posts from the designated source.

Parameters:
Name Type Description
domain string

the domain of the API to make the request to

user string

the username for the API

pass string

the password for the API

Returns:
Array.<object> -

a list of processed solution articles, forum topics, and forum comments

static isSupported() → {Boolean}

Checks to see if certain functions are defined.

Returns:
Boolean

static plugin() → {void}

The lunr.js builder plugin. Meant to be used like builder.use(plugin)

Returns:
void

static process(doc, sourcenullable) → {object}

Modify the documents so that they can be indexed correctly.

Parameters:
Name Type Attributes Description
doc object

the document to be processed

source string <nullable>

the source of the document

Returns:
object -

the processed document