Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 752 Bytes

README.md

File metadata and controls

46 lines (39 loc) · 752 Bytes

Kroky API

Import the module

const kroky = require('kroky-api')

Login

await kroky.login(username, password)

Get meals

week (Number):

  • -1 - Previous week
  • 0 - Current week (Mon - Sun)
  • 1 - Next week
  • ...

Yeah, I know, it's stupid. Better version comming soon™

await kroky.getMeals(week)

Select meal

  • date (Date): 2020-03-18
  • id (Number): 23679 - category id
  • xl (Boolean): true - large meal
await kroky.selectMeal(date, id, xl)

Sample json response

[
    [
        {
            "id": 23679,
            "name": "This is a custom meal name",
            "date": "2020-03-18",
            "selected": true
        }
    ]
]