@feedlify/source-twitter
Retrieves Twitter public data for @feedlify
Last updated a year ago by marcopeg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @feedlify/source-twitter 
SYNC missed versions from official npm registry.

@feedlifly/source-twitter

===========================

This module fetches Twitter public data:

yarn add @feedlifly/source-twitter

You can use sourceTwitter to scrape multiple profiles at the same time:

import sourceTwitter from '@feedlifly/source-twitter'

const items = await sourceTwitter([
    {
        source: 'thepeg',
        limit: 20,
        exclude: [{
            rule: 'username',
            value: [ 'username1', 'username2', '...' ],
        }]
    },
    {
        source: 'foo',
        ...
    }
])

The resulting dataset is organized as follow:

{
    timeline: [
        {
            type: 'twitter::tweet',
            origin: 'twitter::GettyImages',
            author: 'twitter::GettyImages',
            ctime: new Date(2019-03-27T20:57:40.000Z),
            title: 'Tweet by @GettyImages',
            text: 'Thanks @shondarhimes. We\'re proud of being a part of this powerful initiative.',
            url: 'https://twitter.com/shondarhimes/status/1110912567487029249',
            preview: null,
            hashtags: [],
            __meta: [Object]
        }
    ],
    profiles: {
        'twitter::GettyImages': {
            id: 'twitter::GettyImages',
            username: 'GettyImages',
            pic: 'https://pbs.twimg.com/profile_images/1016315371484114944/hxz9PNy6_400x400.jpg',
            url: 'https://twitter.com/GettyImages',
            __meta: []
        }
    }
}

timeline contains a list of contents as feedlify normalized data structure.
The items are sorted by date from the most recent.

You can use timeline.[].author as index in the profiles bucket to retrieve informations that are relevant to the whom has produced the content.

The filed __meta contains original data that was extracted from Twitter.

Current Tags

  • 0.0.1                                ...           latest (a year ago)

2 Versions

  • 0.0.1                                ...           a year ago
  • 0.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |