Example node for connecting Twitter API to Nomad
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitignore
LICENSE
README.md
package.json
sensor.js
twitterAuthenticationBlank.js

README.md

Nomad-Twitter license

npm (scoped)

This repository will walk you through using the twit API client to publish data from twitter API to Nomad a decentralized platform for open data streams built on IPFS.

##Overview

Nomad is a decentralized system for subscribing to, processing, and publishing data in the form of ordered message streams. Nomad is decentralized: there are no message brokers through which messages pass. Nomad uses IPFS to create a peer-to-peer network of nodes that routes messages from publisher to subscriber. Streams are published by nodes which are identified by a public key hash, making Nomad a permissionless system. Anyone can create a new node, subscribe to existing streams, and publish a stream without signing up for any proprietary service.

##Getting Started

###Installation

  • Open Terminal or your prefered terminal emulator
  • First we need to install IPFS. You can download the version for your opertatin system here.
    • macOS 32 bit wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_darwin-386.tar.gz
    • macOS 64 wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_darwin-amd64.tar.gz
    • Linux 32 bit wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_linux-386.tar.gz
    • Linux 64 bit wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_linux-amd64.tar.gz
    • Windows 32 bit wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_windows-386.zip
    • Windows 64 bit wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_windows-amd64.zip
    • FreeBSD wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_freebsd-amd64.tar.gz

tar xvfz go-ipfs.tar.gz mv go-ipfs/ipfs /usr/local/bin/ipfs

  • tar xvfz go-ipfs.tar.gz
  • cd go-ipfs
  • ./install //comment
  • IN ipfs init
  • Then open a new tab (⌘t) in terminal
  • Clone this repo git clone https://github.com/weftech/Nomad-Twitter.git
  • Change direcotries cd Nomad-Twitter
  • Install dependencies npm install
    • ``
    • ``

Example Requests

Filter by Tags

var stream = T.stream('statuses/filter', { track: '#CoLaB'}) //

Filter by User

var sanFrancisco = [ '-122.75', '36.8', '-121.75', '37.8' ] // var stream = T.stream('statuses/filter', { locations: sanFrancisco }) //

Filter by Location

When getting tweets based on location you will need the laungitute and latatude of the area you are looking to sear for.

var sanFrancisco = [ '-122.75', '36.8', '-121.75', '37.8' ] // var stream = T.stream('statuses/filter', { locations: sanFrancisco }) //

// var 東京 = [ '121.4570603', '25.2103038', '121.6659421', '24.9605084' ] // var stream = T.stream('statuses/filter', { locations: 東京 })

##Test

  • In terminal run ipfs daemon to start the IPFS server.
  • Then open a new tab (⌘t) in terminal
  • Navagate to you Nomad-Twitter folder cd PATH_TO_FOLDER/Nomad-Twitter
  • Run it! node sensor.js

##📖 Resources ###Built with

##Troubleshooting Having trouble with Nomad or Nomad-Twitter?Feel free to submite a ticket 🎟

##🎫 Licence MIT (c) IDEO CoLab