pravda-js v0.2.6
PravdaJS
A JS client for PRAVDA
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
});1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
6 years ago
6 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago