0.2.6 • Published 1 year ago

pravda-js v0.2.6

Weekly downloads
48
License
ISC
Repository
bitbucket
Last release
1 year ago

PravdaJS

A JS client for PRAVDA

Build Status codecov

This is a Javascript Client for PRAVDA, which is a GraphQL API that interfaces with the Escenic's WebService. It can be used to query and mutate data in Escenic.

Example usage

Below is a non-ES6 example that gets a news article using promises:

'use strict';

var PravdaJS = require('pravda-js').default;
var client = new PravdaJS({ server: 'https://pravda.me' });

// getting news article with id 123
client.getNews(123)
    .then(function (result) {
        // result here
    }, function (err) {
        // error here
    });

Below is an ES6+ example that gets a news article using highland streams:

import PravdaJS from 'pravda-js';
const client = PravdaJS({ server: 'https://pravda.me', async: 'highland' });

// getting news article with id 123
client.getNews(123)
    .toCallback(function (err, result) { 
        // error and result here
    });

Below is an ES6+ example that gets a news article using highland streams with a specific Escenic user:

import PravdaJS from 'pravda-js';
const client = PravdaJS({ server: 'https://pravda.me', async: 'highland', user: escenicUser, password: escenicPassword });

// getting news article with id 123
client.getNews(123)
    .toCallback(function (err, result) { 
        // error and result here
    });
0.2.6

1 year ago

0.2.5

1 year ago

0.2.40

2 years ago

0.1.40

2 years ago

0.1.30-testing

2 years ago

0.1.30

3 years ago

0.1.27

4 years ago

0.1.28

4 years ago

0.1.29

4 years ago

0.1.24

5 years ago

0.1.22

5 years ago

0.1.21

6 years ago

0.1.19

6 years ago

0.1.15

9 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago