scripts/get-expirations.js
function outputFile(configId, outputdata){
  var fname= configId+ '_accounts.csv';
  console.log("Outputing file... "+fname);
  var input= {
    data: outputdata,
    fields: ['id','name','status','subscriptionStarts','subscriptionExpires']
  };
  json2csv(input, function(err, csv) {
    if (err) {
      console.log('ERROR!');
      console.log(err);
    } else {
      fs.writeFileSync(fname,csv);
    }
  });
}
function outputFile(configId, outputdata){
  var fname= configId+ '_accounts.csv';
  console.log("Outputing file... "+fname);
  var input= {
    data: outputdata,
    fields: ['id','name','status','subscriptionStarts','subscriptionExpires']
  };
  json2csv(input, function(err, csv) {
    if (err) {
      console.log('ERROR!');
      console.log(err);
    } else {
      fs.writeFileSync(fname,csv);
    }
  });
}
function outputFile ( configId , outputdata ) { var fname = configId + '_accounts.csv' ; console . log ( "Outputing file... " + fname ) ; var input = { data : outputdata , fields : [ 'id' , 'name' , 'status' , 'subscriptionStarts' , 'subscriptionExpires' ] } ; json2csv ( input , function ( err , csv ) { if ( err ) { console . log ( 'ERROR!' ) ; console . log ( err ) ; } else { fs . writeFileSync ( fname , csv ) ; } } ) ; }
Get all the accounts and apikeys for a partner account, output as CSV Write the output file
Get all the accounts and apikeys for a partner account output as CSV Write the output file