1.0.1 • Published 2 years ago

md2zrt v1.0.1

Weekly downloads
-
License
GNU GPL V3
Repository
-
Last release
2 years ago

Contributors Forks Stargazers Issues MIT License LinkedIn

Built With

Node

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Node.js

Installation

npm i md2zrt

Usage Example

Require:

const md2zt = require('md2zt');

Interpret Markdown:

/** @type {[string, Array<rich_object>]} */
const [text, rich_objects] = md2zt(markdown);
// markdown: "# Hello World";
// text: 'Hello World';
/*
    rich_objects: [{
        format_type: 'Paragraph',
        format_attr: 'h1',
        start_position: 0,
        end_position: 10
    }];
/*

Fire to Zoom API

    // Posting to /chat/users/{userId}/messages
    const request = require('your-request-lib');
    /* Make POST request*/...
    {
        /* Other request parameters*/...,
        body: {
            message: text,
            rich_text: rich_objects,
            to_channel: ...,
            ...
        },
    }
    
1.0.1

2 years ago

1.0.0

2 years ago