Advertisement
evgenko

Untitled

Jan 13th, 2018
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ApiWrapper = require('api-wrapper');
  2.  
  3. mjpClient = ApiWrapper.create({
  4.     root: 'https://maps.googleapis.com/maps/api/',
  5.     get: {
  6.         findLocation: '/geocode/xml?address|key'
  7.     }
  8. });
  9. log = mjpClient.findLocation({address: "Одесса Канатная 2", key: "AIzaSyBF3mYWZcd8ghOnaHwwwn50obk2JSiStHY"}, cbfindLocation);
  10. console.log(log);
  11.  
  12. function cbfindLocation(error, message, body){
  13.     if (!error) {
  14.         console.log('Got response:', body);
  15.     } else {
  16.         console.warn('Got error:', error);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement