How to use the airtable.apiKey function in airtable

To help you get started, we’ve selected a few airtable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github victorhahn / airtable-plus / lib / AirtablePlus.js View on Github external
_mergeConfig(config) {
        if(!config) return this.config;
        let override = {};
        if(typeof config === "string") override.tableName = config;

        if(typeof config === "object") {
            if(typeof config.transform !== "function") config.transform = undefined;
            override = config;
        }

        let cfg = { ...this.config, ...override };

        if(cfg.apiKey !== Airtable.apiKey) {
            Airtable.apiKey = cfg.apiKey;
            cfg.base = Airtable.base(cfg.baseID);
        }

        if(!cfg.base || (cfg.baseID !== cfg.base.getId())) cfg.base = Airtable.base(cfg.baseID);

        return cfg;
    }
github victorhahn / airtable-plus / lib / AirtablePlus.js View on Github external
_mergeConfig(config) {
        if(!config) return this.config;
        let override = {};
        if(typeof config === "string") override.tableName = config;

        if(typeof config === "object") {
            if(typeof config.transform !== "function") config.transform = undefined;
            override = config;
        }

        let cfg = { ...this.config, ...override };

        if(cfg.apiKey !== Airtable.apiKey) {
            Airtable.apiKey = cfg.apiKey;
            cfg.base = Airtable.base(cfg.baseID);
        }

        if(!cfg.base || (cfg.baseID !== cfg.base.getId())) cfg.base = Airtable.base(cfg.baseID);

        return cfg;
    }

airtable

The official Airtable JavaScript library.

MIT
Latest version published 9 months ago

Package Health Score

70 / 100
Full package analysis