Guest User

Untitled

a guest
Feb 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. axios.all([
  2. axios.post('https://www.googleapis.com/calendar/v3/calendars/xxx/events/watch',
  3. {
  4. type: "web_hook",
  5. address: "https:/rguc-calendars.firebaseapp.com/notifications"
  6. },
  7. {
  8. "Content-Type": "application/json;charset=UTF-8",
  9. Authorization: tokens.token_type + " " + tokens.access_token
  10. }
  11.  
  12. ),
  13. axios.post('https://www.googleapis.com/calendar/v3/calendars/xxx/events/watch',
  14. {
  15. type: "web_hook",
  16. address: "https:/rguc-calendars.firebaseapp.com/notifications"
  17. },
  18. {
  19. "Content-Type": "application/json;charset=UTF-8",
  20. Authorization: tokens.token_type + " " + tokens.access_token
  21. }
  22.  
  23. ),
  24. axios.post('https://www.googleapis.com/calendar/v3/calendars/xxx/events/watch',
  25. {
  26. type: "web_hook",
  27. address: "https:/rguc-calendars.firebaseapp.com/notifications"
  28. },
  29. {
  30. "Content-Type": "application/json;charset=UTF-8",
  31. Authorization: tokens.token_type + " " + tokens.access_token
  32. })
  33. axios.post('https://www.googleapis.com/calendar/v3/calendars/xxxm/events/watch',
  34. {
  35. type: "web_hook",
  36. address: "https:/rguc-calendars.firebaseapp.com/notifications"
  37. },
  38. {
  39. "Content-Type": "application/json;charset=UTF-8",
  40. Authorization: tokens.token_type + " " + tokens.access_token
  41. })
  42. ....etc
  43. ])
  44. .then(axios.spread(function (acct, perms) {
  45. console.log("subscribed to all event watches")
  46. }));
Add Comment
Please, Sign In to add comment