Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pravda-js

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pravda-js

A node.js client for PRAVDA

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
471
increased by336.11%
Maintainers
0
Weekly downloads
 
Created
Source

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
    });

FAQs

Package last updated on 22 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc