tra-analysis/website/functions/node_modules/google-proto-files/README.md
2019-01-06 13:14:45 -06:00

3.0 KiB

Google Cloud Platform logo

googleapis Proto Files: Node.js Client

release level CircleCI AppVeyor 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
var 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) {
  var MyService = root.lookup('example.MyService')
})

Synchronously

var root = protoFiles.loadSync('path/to/file.proto');
var 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