Nourishing Pear Medley

    @caelum-tech/lorena-matrix

    1.0.3 • Public • Published

    Lorena-matrix

    lorena-matrix is a caelum api for matrix connection used in Lorena.

    Installation

    npm @caelum-tech/lorena-matrix

    Getting Started

    const Matrix = require('@caelum-tech/lorena-matrix')
    // Creating class Matrix with parameter `homesrever`
    const matrix = new Matrix('https://matrix.org')
    // Check if user exists
    if ( (await matrix.available(username)) ) {
        // Registering to matrix `homeserver` with `username` and `password`
        const primaryUser = await matrix.register('username', 'password')
        // Connecting to account with username `username` and password `password`
        matrix.connect(username, password)
            .then((res)=>{console.log("Connected:", res)})
            .catch((e)=>{console.log("Error:", e)})
        // Read events: If argument=='' then all history events are reveived
        matrix.events('')
            .then((a,b)=>{console.log("Correct:", a)})
            .catch((e)=>{console.log("Error in events:", e)})
    }

    Keywords

    none

    Install

    npm i @caelum-tech/lorena-matrix

    DownloadsWeekly Downloads

    7

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    29.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • alexpuig
    • chuck-caelum