lib/fetching/channels/crowdtangle.js
/**
     * Reads the pair of Saved Search & List lists associated with
     * this AggieCrowdTangleChannel from the `crowdtangle_list.json` file.
     */
Reads the pair of Saved Search & List lists associated with
this AggieCrowdTangleChannel from the `crowdtangle_list.json` file.
Reads the pair of Saved Search & List lists associated with this AggieCrowdTangleChannel from the ` crowdtangle_list . json ` file .
async readListPair() {
        const filePath = path.resolve(__dirname + '../../../../config/crowdtangle_list.json');
        let listPairs;
        try {
            const fileContents = await readFile(filePath, { encoding: 'utf8' });
            listPairs = JSON.parse(fileContents);
        } catch (err) {
            listPairs = {};
        }
        const listPair = listPairs[this.hashedToken];
        if (typeof listPair === 'object') {
            return listPair;
        }
        return {
            crowdtangle_list_account_pairs: {},
            crowdtangle_saved_searches: {},
        };
    }
async readListPair ( ) { const filePath = path . resolve ( __dirname + '../../../../config/crowdtangle_list.json' ) ; let listPairs ; try { const fileContents = await readFile ( filePath , { encoding : 'utf8' } ) ; listPairs = JSON . parse ( fileContents ) ; } catch ( err ) { listPairs = { } ; } const listPair = listPairs [ this . hashedToken ] ; if ( typeof listPair === 'object' ) { return listPair ; } return { crowdtangle_list_account_pairs : { } , crowdtangle_saved_searches : { } , } ; }
Reads the pair of Saved Search & List lists associated with
 this AggieCrowdTangleChannel from the `crowdtangle_list.json` file.
Reads the pair of Saved Search & List lists associated with this AggieCrowdTangleChannel from the ` crowdtangle_list . json ` file .
// lists are stored with hashes for security