Chaiwa

Discover jsdocs

Jan 15th, 2021
631
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Discover available `DHIS2` `api` `endpoint` `query parameters` and allowed `operators` for a given resource's endpoint.
  3.  * @public
  4.  * @function
  5.  * @param {string} httpMethod - The HTTP to inspect parameter usage for a given endpoint, e.g., `get`, `post`,`put`,`patch`,`delete`
  6.  * @param {string} endpoint - The path for a given endpoint. E.g. `/trackedEntityInstances` or `/dataValueSets`
  7.  * @returns {Promise<state>} state
  8.  * @example <caption>Example getting a list of `parameters allowed` on a given `endpoint` for specific `http method`</caption>
  9.  * discover('post', '/trackedEntityInstances')
  10.  */
RAW Paste Data