Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@lunchly/service-zerocater

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lunchly/service-zerocater

ZeroCater API consumer for Lunchly.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

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

Keywords

bot

FAQs

Package last updated on 25 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts