npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

google-proto-files

0.20.0 • Public • Published
Google Cloud Platform logo

googleapis Proto Files: Node.js Client

release level npm version codecov

Get a copy of the googleapis proto files into your project.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Usage

$ npm install --save google-proto-files
const protoFiles = require('google-proto-files')

Get a directory path by executing as a function

protoFiles('logging', 'v2')
// node_modules/google-proto-files/google/logging/v2

Get a path to the entry proto file for a specific API version

protoFiles.pubsub.v1
// node_modules/google-proto-files/google/pubsub/v1/pubsub.proto

load|loadSync(fileName, [options])

options

Load a proto which depends on google common protos.

Asynchronously

protoFiles.load('path/to/file.proto').then(function(root) {
  const MyService = root.lookup('example.MyService')
})

Synchronously

const root = protoFiles.loadSync('path/to/file.proto');
const MyService = root.lookup('example.MyService');

Versioning

This library follows Semantic Versioning.

This library is considered to be in alpha. This means it is still a work-in-progress and under active development. Any release is subject to backwards-incompatible changes at any time.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

License

Apache Version 2.0

See LICENSE

install

npm i google-proto-files

Downloadsweekly downloads

687,424

version

0.20.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability