SHARE
TWEET

Untitled

a guest Aug 13th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const agileCrm = require('agile_crm');
  2.  
  3. let aCrm = new agileCrm(process.env.AGILE_DOMAIN, process.env.AGILE_APIKEY, process.env.AGILE_EMAIL + '@broader.com.au');
  4.  
  5. module.exports = function () {
  6.     aCrm.contactAPI.getCompaniesByPropertyFilter('Type', 'School', success, error);
  7. };
  8.  
  9. var success = function (data) {
  10.     console.log('returning obj');
  11.     return(resultObj);
  12. };
  13.  
  14. var error = function (data) {
  15.     console.log(data);
  16. };
  17.    
  18. ...
  19.  
  20. const getSchoolsFromAgile = require('./getSchoolsFromAgile.js');
  21.  
  22. ...
  23.  
  24. app.get('/schools', function(req, res) {
  25.     console.log('sending res');
  26.     res.send(getSchoolsFromAgile());
  27. });
RAW Paste Data
Top