turbot/twitter

steampipe plugin install twittersteampipe plugin install twitter

Twitter + Steampipe

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

Twitter is an American microblogging and social networking service on which users post and interact with messages known as "tweets".

For example:

select
id,
text,
mentions
from
twitter_search_recent
where
query = '#shiftleftjoin'
+---------------------+-----------------------------------------------------+-----------------+
| id | text | mentions |
+---------------------+-----------------------------------------------------+-----------------+
| 1378041446687768578 | New! Steampipe GCP plugin v0.5.0 🚀 | ["googlecloud"] |
| | | |
| | Docs — https://t.co/s407cEdLAE | |
| | | |
| | Changelog — https://t.co/nFbLeh0KMu | |
| | | |
| | #shiftleftjoin @googlecloud https://t.co/0bGH747VRs | |
| 1377720348804853761 | New! Steampipe AWS plugin v0.10.0 🚀 | ["awscloud"] |
| | | |
| | Docs - https://t.co/Y0vghMB1ub | |
| | | |
| | Changelog – https://t.co/8IETtyFBGZ | |
| | | |
| | #shiftleftjoin @awscloud https://t.co/o7ifZQlRMe | |
| 1377723768857104391 | New! Use SQL to instantly query Oracle Cloud 🚀 | ["OracleCloud"] |
| | | |
| | Open source. No DB required. | |
| | | |
| | #shiftleftjoin @OracleCloud | |
| | | |
| | https://t.co/Jy9imAz9qK | |
+---------------------+-----------------------------------------------------+-----------------+

Documentation

Get started

Install

Download and install the latest Twitter plugin:

steampipe plugin install twitter

Credentials

ItemDescription
CredentialsApply for a free developer account. Create a project. Download the bearer token.
PermissionsRead Only is required for the app.
RadiusEach connection represents a single set of Twitter credentials.
Resolution1. bearer_token in Steampipe config.
2. consumer_key, consumer_secret, access_token, access_secret in Steampipe config.
3. TWITTER_BEARER_TOKEN environment variable.
4. TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, TWITTER_ACCESS_TOKEN and TWITTER_ACCESS_SECRET environment variables.

Configuration

Installing the latest twitter plugin will create a config file (~/.steampipe/config/twitter.spc) with a single connection named twitter:

connection "twitter" {
plugin = "twitter"
bearer_token = "AAAAAAAAAAAAAAAAAAAAAFL8NgEAAAAA2%2FyHFNeRK0CUoZ5ybpsHgnL91n0%3DEJPs4GsJVU8ZlrHYr1x0eyb4Br48WeqLtmM4aAKbIxpInTrrIu"
}

Get involved