New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

downstream

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downstream

A multi-platform and real-time social media aggregation framework.

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by71.43%
Maintainers
1
Weekly downloads
 
Created
Source

Downstream · npm version GitHub license PRs Welcome

Downstream is a multi-platform and real-time social media aggregation framework.

Installation

Downstream is released as a Node.js package on the npm registry.

Node.js 12.9 or higher is required to use Downstream in your project.

To install Downstream for your project, run the below command from your terminal:

npm install downstream

Usage

1. Downstream aggregates data via Channels.

  • Built-in Channels aggregate posts from platforms like Facebook, Instagram, or Twitter.
  • Create your own Channels to easily aggregate data from other platforms and sources.
  • Use a WebChannel to expose Downstream on your local network or string multiple Downstream instances together via a simple HTTP interface.
// channels.js

const { builtin } = require('downstream');
const { TwitterStreamChannel } = builtin;

const credentials = {
    consumerKey: process.env.TWITTER_CONSUMER_KEY,
    consumerSecret: process.env.TWITTER_CONSUMER_SECRET,
}

const twitterChannel = new TwitterStreamChannel({ credentials });

module.exports = { twitterChannel };

2. Access and mutate your aggregated data via hooks.

// hooks.js

async function logHook(post, next) {
  console.log(post);
  await next();
}

module.exports = { logHook };

3. Initialize and start a new Downstream instance.

// main.js

const { Downstream } = require('downstream');
const { twitterChannel } = require('./channels');
const { logHook } = require('./hooks');

const downstream = new Downstream();

// register Channels
downstream.register(twitterChannel);

// use hooks
downstream.use(logHook);

// log any errors
downstream.on('error', console.log);

downstream.start();

Documentation

Our detailed API documentation is available in the docs/ folder.

Examples

Several examples are available in the examples/ folder.

Contributing

See our Contributing Guidelines for details. We welcome outside contributions!

People

Downstream is actively built and maintained by the Technologies & International Development (T+ID) Lab at Georgia Tech to support the Aggie platform and other research initiatives.

This project would not be possible without the amazing work done by the original contributors to the Aggie platform whose work on the original backend for Aggie inspired the idea and architecture behind Downstream. Thank you.

License

GNU GPLv3

Keywords

FAQs

Package last updated on 19 Sep 2023

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