0.2.20 • Published 4 years ago

@caelumlabs/comms v0.2.20

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

matrix-lib

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

NPM Status Build Status Coverage Status

Installation

npm @lorena-ssi/matrix-lib

Getting Started

const Comms = require('@caelumlabs/comms')
// Creating class Matrix with parameter `homeserver`
const matrix = new Comms('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 received
    matrix.events('')
        .then((a,b)=>{console.log("Correct:", a)})
        .catch((e)=>{console.log("Error in events:", e)})
}
0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.30

5 years ago

0.1.28

5 years ago

0.1.29

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.20

5 years ago

0.1.21

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.15

5 years ago

0.1.13

5 years ago

0.1.11

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago