Initial commit
This commit is contained in:
commit
cfbb628536
6 changed files with 309 additions and 0 deletions
13
index.js
Normal file
13
index.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const { fetchNewEvents } = require('./api');
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
const state = {};
|
||||
|
||||
setInterval(async () => {
|
||||
const { events, seenIds } = await fetchNewEvents(state.seenIds);
|
||||
state.seenIds = seenIds;
|
||||
events.forEach(event => {
|
||||
console.log(event);
|
||||
});
|
||||
}, 1000);
|
||||
Loading…
Add table
Add a link
Reference in a new issue