@reuters-graphics/teams-klaxon
    Preparing search index...

    Class TeamsKlaxon

    Index

    Constructors

    • Create a new TeamsKlaxon instance with your Teams Workflow webhook URL.

      Note: This library uses the attachments format which works with most Teams Workflows.

      Parameters

      • webhook: string

        A Teams Workflow webhook URL

      Returns TeamsKlaxon

      const klaxon = new TeamsKlaxon('https://prod.workflows.office.com/webhook/...');
      

    Methods

    • Make an adaptive card.

      Parameters

      Returns void

      klaxon.makeCard([
      Elements.TextBlock('Hello _world_!'),
      ]);
    • Verify a card is valid.

      Returns boolean

      klaxon.makeCard([
      Elements.TextBlock('Hello _world_!'),
      ]);

      klaxon.cardIsValid();
      // true
    • Post your card to Teams.

      Returns Promise<AxiosResponse<any, any, {}> | undefined>

      klaxon.makeCard([
      Elements.TextBlock('Hello _world_!'),
      ]);

      const response = await klaxon.postCard();

      response.status
      // 202