https://github.com/xdevplatform/etl
An example app demonstrating storing Tweets in a Google Spreadsheet
https://github.com/xdevplatform/etl
etl google google-sheets-api twitter-api twitter-api-v2 typescript
Last synced: 9 months ago
JSON representation
An example app demonstrating storing Tweets in a Google Spreadsheet
- Host: GitHub
- URL: https://github.com/xdevplatform/etl
- Owner: xdevplatform
- License: apache-2.0
- Created: 2021-05-07T05:06:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-18T21:56:18.000Z (over 4 years ago)
- Last Synced: 2024-04-22T01:00:34.276Z (over 1 year ago)
- Topics: etl, google, google-sheets-api, twitter-api, twitter-api-v2, typescript
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 9
- Watchers: 18
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Code Examples for using Twitter API v2
## Extract Transform and Load
Follow this [tutorial](https://developer.twitter.com/...)
(TODO: @duckranger add details)
1. Clone this repository
1. Run `npm install` in the repo's directory
1. Obtain a json key file for Google API (See https://www.fastcomet.com/tutorials/nodejs/google-spreadsheet-package) and place it inside the config directory
1. Obtain a Twitter access token
1. Create a Google Spreadsheet and get its id (The last part of the url: https://docs.google.com/spreadsheets/d/xxxxxxx)
1. Make sure to share the sheet with `client_email` from within the Google json key file
1. `npm start`
### Environment Variables
The code relies on the following variables to be available, e.g. by using an `.env` file.
```
TW_BEARER_TOKEN=
TW_TERM=
TW_HASHTAG=
TW_GOOGLE_DOC_ID=
```
It also requires the Google json keyfile to be stored in `/config/client_secret.json`