Newly Potted Mandrakes

    @lunchly/service-zerocater

    0.2.1 • Public • Published

    service-zerocater CircleCI codecov

    ZeroCater integration for Lunchly

    Wraps the ZeroCater REST API, allowing the Lunchly meal-announcement bot to query current and upcoming meals.

    Install

    $ npm install @lunchly/service-zerocater --save
    

    Usage

    Lunchly integration
    const { today } = require('@lunchly/service-zerocrater');
    const companyId = controller.config.zerocrater_company_id;
    const {
      id,
      name,
      vendor_name: vendorName,
      vendor_image_url: vendorImageURL,
      vendor_description: vendorDescription
    } = await today(companyId);
    
    const mealsURL = ZEROCRATER_MEALS_URL.replace('{companyId}', companyId);
    const mealURL = `${mealsURL}/${id}`;
    
    const messageTemplate = `Today's lunch is *${name}*, brought to you by *${vendorName}* — _${vendorDescription}_`;

    API

    .all

    Type: Array

    All meals returned by ZeroCater.

    .today()

    Type: Function

    Today's meal.

    License

    MIT © Chris Vogt

    Install

    npm i @lunchly/service-zerocater

    DownloadsWeekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    9.38 kB

    Total Files

    16

    Last publish

    Collaborators

    • chrisvogt