Client and resources
JanuaryClient is the package's entry point.
new JanuaryClient({ endUserId, timezone, clientTokenProvider });timezone
string
An IANA name; recommended. Same page.
clientTokenProvider
JanuaryTokenProvider
(endUserId) => Promise<{ token, expiresIn }>; see Authentication.
clientTokenProvider and developmentApiKey are mutually exclusive in the TypeScript types.
foods
Autocomplete, search, get a food, barcode lookup, alternatives
restaurants
Restaurant search, menu-item search, restaurant menus
foodAnalysis
Description analysis, photo analysis, corrections
foodLogs
Create, list, summarize, update, and delete food logs
waterLogs
Log water, read daily totals, delete a log
weightLogs
Log a weight, read the latest weight per day
glucose
Personalized glucose prediction
dispose() releases the client; see Client lifecycle.
Other exports:
getNativeModuleVersion()returns the package version, such as"0.3.0", when the native module is linked, andnullwhen it isn't (Confirm linking).VoiceCaptureSessionandVoiceCaptureError; see Voice capture.FoodCategory, with the category stringsgeneric,branded, andrecipeas constants.
Last updated
Was this helpful?