This is because data is how you get JSON data into a request body using HTTP.post. This package is just a wrapper for that which tacks on your Google auth and refreshes your OAuth token if necessary. And also lets you make the call async.
I hope something like this can get put in the README...
Hey @wizonesolutions -- are you saying that we should update the README to more firmly state that this package is a wrapper around Meteor's HTTP library?
Took me a while to figure this out; I was using a
POST
call to the Google Calendar API.Most examples show
resource
being used inoptions
, but with this package you have to do this:This is because
data
is how you get JSON data into a request body usingHTTP.post
. This package is just a wrapper for that which tacks on your Google auth and refreshes your OAuth token if necessary. And also lets you make the call async.I hope something like this can get put in the README...