-
Notifications
You must be signed in to change notification settings - Fork 1
/
airtable.ts
47 lines (40 loc) · 1.1 KB
/
airtable.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import Airtable from 'airtable';
/**
* Object of airtable table ids
*/
const tables = {
CONSTANTS: 'tblZkwNKTByvWfO6P',
HERO_ABILITIES: 'tblU5qFbU8cc0diXq',
HEROS: 'tblTWmz40jBegB1TJ',
MECHANICS: 'tblmYzve1mJUuIpfq',
SET_CORE: 'tblwYhK2ndoM2lohc',
SET_ENTOURAGE: 'tblC5Cy6pKp8EaQaV',
SET_GAME: 'tblQLQ0BnfCAJvu6F',
SET_PRIME: 'tblajpxLahsUgKzVd',
};
// Authenticate
Airtable.configure({
apiKey: process.env.AIRTABLE_API_KEY,
});
// console.log(process.env.AIRTABLE_API_KEY)
// Initialize a base
const base = Airtable.base(process.env.AIRTABLE_BASE_ID!);
// Reference a table
const constantsTable = base(tables.CONSTANTS);
const mechanicsTable = base(tables.MECHANICS);
const herosTable = base(tables.HEROS);
const abilitiesTable = base(tables.HERO_ABILITIES);
const setsCoreTable = base(tables.SET_CORE);
const setsPrimeTable = base(tables.SET_PRIME);
const setsEntourageTable = base(tables.SET_ENTOURAGE);
// export {
// constantsTable,
// mechanicsTable,
// herosTable,
// abilitiesTable,
// setsCoreTable,
// setsCoreTable,
// setsPrimeTable,
// setsEntourageTable,
// };
export {}