JSPM

googleapis-nodejs-functions

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q61156F
  • License Apache-2.0

Google Cloud Functions Client Library for Node.js (unofficial)

Package Exports

  • googleapis-nodejs-functions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (googleapis-nodejs-functions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Google Cloud Functions Node.js Library

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.

    Go to the projects page

  2. Enable billing for your project.

    Enable billing

  3. Enable the Google Cloud Functions.

    Enable the API

  4. Set up authentication with a service account so you can access the API from your local workstation.

Installing the client library

npm install --save googleapis-nodejs-functions

Using the client library

// Imports the Google Cloud client library
const { GCF } = require('googleapis-nodejs-functions');

// Your Google Cloud Platform project ID
const projectId = 'YOUR_PROJECT_ID';

// Creates a client
const gcf = new GCF({
  keyFilename: './credentials.json',
  projectId
});

// Get Functions and metadata
gcf
  .getCloudFunctions()
  .then(data => {
    const fns = data[0];
    //console.log('FUNCTIONS: ', fns);
    const fn = fns[0];
    console.log(fn.metadata);
  })
  .catch(err => {
    console.error('ERROR:', err);
  });

Samples

Versioning

Contributing

License

Apache Version 2.0

See LICENSE