Skip to content

Commit 940762a

Browse files
committed
add GET /events
1 parent bfa8560 commit 940762a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ npm run start
7676

7777
**200**: Returns a list of Explorers wallets
7878

79+
### GET `/events`
80+
81+
**200**: Returns a list of Events
82+
7983
### GET `/coingecko-cosmos-marketcap`
8084

8185
**200**: Returns the value of total market cap of Cosmos projects using Coingecko API

src/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ app.get("/explorers", async (req, res) => {
201201
});
202202
});
203203

204+
app.get("/events", async (req, res) => {
205+
const airtable = new Airtable({ apiKey: AIRTABLE_API_KEY })
206+
.base("app257DDgKV2KGpWA")
207+
.table("events");
208+
209+
airtable
210+
.list({
211+
maxRecords: 1000,
212+
})
213+
.then((response) => {
214+
res.send(response);
215+
});
216+
});
217+
204218
app.get("/coingecko-cosmos-marketcap", cache.serve(30), async (req, res) => {
205219
const data = [
206220
"cosmos",

0 commit comments

Comments
 (0)