1.0.3 • Published 7 years ago

the-crawler-twitter v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

the-crawler-twitter

Build Status npm Version JS Standard

Crawler for twitter

Installation

$ npm install the-crawler-twitter --save

Usage

'use strict'

const theDB = require('the-db')
const { TheTwitterCrwl } = require('the-crawler-twitter')

async function tryExample () {
  const db = theDB({ /* ... */ })

  {
    class TweetResource extends theDB.Resource { /* ... */ }
    class TweetHtml extends theDB.Resource { /* ... */ }
    db.load(TweetResource, 'Tweet')
    db.load(TweetHtml, 'TweetHtml')
  }
  {
    let crwl = new TheTwitterCrwl({
      resources: {
        consumerKey: 'xxxxxxxxxxxxxxxxxxx',
        consumerSecret: 'xxxxxxxxxxxxxxxxxxx',
        accessTokenKey: 'xxxxxxxxxxxxxxxxxxx',
        accessTokenSecret: 'xxxxxxxxxxxxxxxxxxx',
        Resource: db.resources.Tweet,
        HtmlResource: db.resources.TweetHtml
      }
    })
    await crwl.run({})
  }
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago