Google Cloud Functions Node.js Library
Table of contents:
Quickstart
Before you begin
-
Select or create a Cloud Platform project.
Go to the projects page
-
Enable billing for your project.
Enable billing
-
Enable the Google Cloud Functions.
Enable the API
-
Set up authentication with a service account so you can access the
API from your local workstation.
Installing the client library
npm install --save vizzuality/googleapis-nodejs-functions
Using the client library
const { GCF } = require('../build/src');
const projectId = 'YOUR_PROJECT_ID';
const gcf = new GCF({
keyFilename: './credentials.json',
projectId
});
gcf
.getCloudFunctions()
.then(data => {
const fns = data[0];
const fn = fns[0];
fn.getMetadata()
.then(data => {
console.log('Function: ', data[0]);
})
.catch(err => {
console.error('ERROR:', err);
});
})
.catch(err => {
console.error('ERROR:', err);
});
Samples
Versioning
Contributing
License
Apache Version 2.0
See LICENSE