https://github.com/application-research/estuary-tweeter
Estuary tweeter that tweets daily, weekly and monthly stats
https://github.com/application-research/estuary-tweeter
Last synced: 8 months ago
JSON representation
Estuary tweeter that tweets daily, weekly and monthly stats
- Host: GitHub
- URL: https://github.com/application-research/estuary-tweeter
- Owner: application-research
- Created: 2022-12-30T20:00:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T13:23:15.000Z (over 3 years ago)
- Last Synced: 2025-01-25T04:11:09.951Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 190 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Estuary statistics tweeter
Simple Estuary stat "Tweeter"
This uses the metrics-api web service endpoint: https://metrics-api.estuary.tech/api/v1/stats/to-twitter?from=2022-12-01&to=2022-12-30. Dates varies based on the scheduled job run.
## Set up twitter API key
```
CONSUMER_KEY=
CONSUMER_SECRET=
ACCESS_TOKEN_KEY=
ACCESS_TOKEN_SECRET=
```
## Running the script
```
node index.js
```
This runs a job that will run on the following scheduler
```
// Run daily every day at 1:00pm
Schedule.scheduleJob('0 1 * * *', () => {
daily.run();
})
// Run weekly 10:00AM on Friday
Schedule.scheduleJob('0 10 * * 5', () => {
weekly.run();
})
// Run monthly 12AM 1st day of the Month
Schedule.scheduleJob('0 0 1 * *', () => {
monthly.run();
})
```
## Other utils
To quickly generate a stats text to tweet.
```
node utils/report-stats.js 2022-12-30 2022-12-31
```
## Output
```
@Estuary_Tech stats:
from 2022-12-31 to 2022-01-01
🗂️Content deals made over 24 hours: 44
🗄Content deals size made over 24 hours: 699.41 GB
💼Sealed deals over 24 hours: 0
🤝Total size of sealed deals over 24 hours: 0 GB
About Estuary:
🌐https://estuary.tech
```