When using the MyDataHelps SDK, there are several query parameters with flexible or custom data types.
Contents
Several functions return a JavaScript Promise. Promises allow the rest of your application to proceed while waiting for the requested operation to finish.
Promise return types are described with angle-brackets to convey what they resolve to. For example, Promise<string>
is a Promise
that will provide a single string
parameter to subsequent operations.
null
. Leave a field undefined
if you want results without considering that field.
Dates in MyDataHelps are composed of a date, time and offset.
Many queries allow for dates to narrow results. If not specified, the default time is midnight and the default offset is +0. Provide dates in a form that can be parsed into a JavaScript Date object, such as:
new Date(2021, 5, 20)
"2021-02-16T16:00:00+04:00"
Methods whose results include date types will provide an ISO8601 string representation of the date.
new Date("2021-02-16T16:00:00+04:00")
A guid should be provided as a string containing a series of hexadecimal characters, separated by hyphens. Guids are not typically available in any user interface, but are often found in the results of queries.
Example: "92f2e02c-256b-eb11-aa7f-f8e4e3480e0d"
Some query parameters can accept an array of strings.
Provide these parameters as:
["MoodRating_QuestionStep", "MoodRating_SlidingScaleStep"]
"MoodRating_SlidingScaleStep"