Retrieve nutrition data for a given connection and date range
function getBody(
connection: Connections,
startDate: Date,
endDate: Date,
toWebhook: Boolean = true
): Promise<DataMessage>
connection: Connections
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.startDate: Date
➡ The beginning of the request in either Date or Unix TimestampendDate: Date
orendDate: Long
➡ The end of the request in either Date or Unix TimestamptoWebhook: Bool
➡ Whether or not to send data to your webhook. If false,DataMessage
on the returnedPromise
will contain the data in thedata
field.
returns
Promise<DataMessage>