Socket
Book a DemoInstallSign in
Socket

ring-websites-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ring-websites-sdk

Ring Websites SDK

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Ring Websites SDK

Ring Websites SDK will help You to use Ring Websites API: https://api.ringpublishing.com/websites/v2

All you need is your Websites Space UUID and access/secret keys.

Requirements

Make sure you have NodeJS installed and running in version 14 or above.

Installation

When you have your node running, install our SDK by running the command:

    $ npm install -g ring-websites-sdk

Usage

Look how easy is to use Ring Website API using SDK:

    let RingWebsitesSDK = require('ring-websites-sdk');
    
    let space = process.env.SPACE;
    let access = process.env.ACCESS;
    let secret = process.env.SECRET;
    
    console.log("ARGUMENTS:", space, access, secret);
    
    let rwSdk = new RingWebsitesSDK(space, access, secret);
    
    rwSdk.call({query: `{ name }`}).then(function(data) {
        console.log("DATA", data);
    }).catch(function(error) {
        console.log("ERR", error);
    });

Reference

    class RingWebsitesSDK

        constructor:
            spaceUuid (UUIDv4 string) - Websites Space UUID
            accessKey (UUIDv4 string) - Access Key
            secretKey (UUIDv4 string) - Secret Key
            options (object):
                - timeout (number, default 4000) - Response timeout 
    
        methods:
            call (request Object) - query/mutation object:
                {
                    query/mutation (string/ required): GQL string
                    operationName (string): operation name
                    variables (key/value Object): query variables
                }

Keywords

Ring

FAQs

Package last updated on 16 Sep 2022

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