Socket
Socket
Sign inDemoInstall

@reuters-graphics/teams-klaxon

Package Overview
Dependencies
3
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @reuters-graphics/teams-klaxon

[![npm version](https://badge.fury.io/js/%40reuters-graphics%2Fteams-klaxon.svg)](https://badge.fury.io/js/%40reuters-graphics%2Fteams-klaxon) [![Reuters open source software](https://badgen.net/badge/Reuters/open%20source/?color=ff8000)](https://github.c


Version published
Maintainers
1
Install size
1.93 MB
Created

Readme

Source

@reuters-graphics/teams-klaxon

npm version Reuters open source software

Send messages to a Microsoft Teams channel.

Quickstart

Setup a Microsoft Teams incoming webhook in a channel, then install the library.

$ yarn add @reuters-graphics/teams-klaxon
const TeamsKlaxon = require('@reuters-graphics/teams-klaxon');

// Your incoming webhook
const webhook = 'https://outlook.office.com/webhook/...';

const klaxon = new TeamsKlaxon(webhook);

await klaxon.log({
  text: 'A simple message',
});

Message formats

Text
await klaxon.log({
  text: 'A simple message',
});

Facts
await klaxon.log({
  title: '⚙️ Testing facts',
  facts: {
    Name: 'Jon McClure',
    Age: '35',
  },
});

Images
await klaxon.log({
  title: '⚙️ Testing images',
  images: [
    'https://scitechdaily.com/images/Great-White-Shark-Smile-1536x1152.jpg',
    'https://cdn.britannica.com/79/65379-050-5CF52BAC/Shortfin-mako-shark-seas.jpg',
  ],
});

Stack trace
await klaxon.log({
  title: '⚙️ Testing stack trace',
  stackTrace: {
    code: 'console.log(\'hello world\'!)',
  },
});

await klaxon.log({
  title: '⚙️ Testing link buttons',
  linkButtons: [{
    name: 'Google',
    link: 'https://www.google.com',
  }, {
    name: 'Twitter',
    link: 'https://www.twitter.com',
  }],
});

Testing

$ yarn test

FAQs

Last updated on 23 Aug 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc