yutanakamizo / dc_twitter-space-notif_backend Goto Github PK
View Code? Open in Web Editor NEWA server to watch and notify the state of specific Twitter users' Twitter Space.
License: MIT License
A server to watch and notify the state of specific Twitter users' Twitter Space.
License: MIT License
Twitter API Key と監視対象 Twitter ユーザ ID などを .env ではなく YAML で記述する.
ついでに各種設定にも対応したい.
targets:
{Twitter User ID}: # (not screenname)
twitter_bearer_token: {Twitter Bearer Token Alias}
interval: {nodecron Interval String}
destinations:
{Destination Alias}:
type: {Destination Type <"webhook" | "discord.webhook" | "twitter.tweet">}
# Webhook
url: {Webhook URL}
{...webhook Options}
# Discord - Webhook
url: {Webhook URL}
{...discord.webhook Options}
# Twitter - Tweet
token: {Twitter User Access Token}
secret: {Twitter User Access Secret}
token_file: {Twitter User Access Token File Path}
secret_file: {Twitter User Access Secret File Path}
{...twitter.tweet Options}
...
...
twitter_bearer_tokens:
{Twitter Bearer Token Alias}:
token: {Twitter Bearer Token}
token_file: {Twitter Bearer Token File Path}
...
Cloud Firestore, MySQL にも対応したい (#78)
targets:
{Twitter User ID}: # (not screenname)
twitter_bearer_token: {Twitter Bearer Token Alias}
interval: {nodecron Interval String}
destinations_firestore:
token: {Firestore Token Alias}
history_collection: ""
destination_collection: ""
...
firebase_tokens:
{Firebase Token Alias}:
filename: "****.json" # in /usr/src/notif-app/firebase.d/
...
twitter_bearer_tokens:
{Twitter Bearer Token Alias}:
token: {Twitter Bearer Token}
token_file: {Twitter Bearer Token File Path}
...
targets:
{Twitter User ID}: # (not screenname)
destinations_firestore:
token: {Firestore Token Alias}
history_collection: ""
destination_collection: ""
...
firebase_tokens:
{Firebase Token Alias}:
filename: "****.json" # in /usr/src/api-app/firebase.d/
...
update 時にエラー
ログの日時が GMT になってしまっている. JST に変更.
#68 の副作用
common に移行済み
restart: always
ファイルを 1 つに統合
Promise.all / allSettle には Promise[] を渡す.
ホスト側の /data/{serviceName} に統一
cron ジョブ実行間隔に通知が間に合わなかった場合に state.json が更新されないまま次の cron ジョブが実行されてしまう.
--> pid ファイルで重複回避
notif コンテナから読めていなかった
ログに [object] として表示されている. JSON.stringify が必要.
Twitter API を用いた Space 情報取得でのエラー発生時に state.json がリセットされてしまう.
--> currentSpacesAll
の初期値を previousSpacesAll
に変更
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.