Socket
Socket
Sign inDemoInstall

streamshield

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamshield

Official Streamshield npm library


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Streamshield nodejs library

About

The Streamshield node client library is intended to speed up building plugins for applications that are built with node. The intention is for it to help speed up building plugins for other applications that are built with node, for example CMS's.

Installation

npm i streamshield

or

yarn add streamshield

Example

import Streamshield from 'streamshield'

const ss = new Streamshield()
ss.setApiKey('<your API access key>', '<your API secret key'>)

// First time registration

await ss.register('My CMS', 'v1.0.0', 'v1.0.0') // e.g. CMS version and your plugin version

// Send content for moderation

const meta = {
  domain: '<domain registered in Streamshield>',
  scheme: 'https',
  username: '<the author of the content>',
  ip_address: '<the ip address of the author, if known>',
  content_path: 'https://yourdomain.com/path/to/content',
  action: 'created',
  status: 'PENDING'
}

// Add content

const fields = [
  {
    id: 'title',
    type: 'string',
    value: 'Moderate this string of text!',
    hash: '<SHA1 of value>'
  },
  {
    id: 'image',
    type: 'file',
    value: '/relative/path/to/file', // Streamshield will attempt to retrieve the content remotely
    hash: '<SHA1 of file on disk>'
  },
  ...
]

// Moderate

const response = await ss.moderate(meta, fields)

if(response) {
  // Content has been moderated, check Streamshield dashboard
} else {
  // errors
}

Keywords

FAQs

Package last updated on 18 May 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