All of the Google API's protocol buffer files
Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
Table of contents:
bash
npm install google-proto-files
js
const protoFiles = require('google-proto-files')
js
protoFiles('logging', 'v2')
// node_modules/google-proto-files/google/logging/v2
js
protoFiles.pubsub.v1
// node_modules/google-proto-files/google/pubsub/v1/pubsub.proto
js
protoFiles.load('path/to/file.proto').then(function(root) {
const MyService = root.lookup('example.MyService')
})
js
const root = protoFiles.loadSync('path/to/file.proto');
const MyService = root.lookup('example.MyService');
The Google APIs Proto Files Node.js Client API Reference documentation also contains samples.
This library follows Semantic Versioning.
This library is considered to be General Availability (GA). This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against GA libraries are addressed with the highest priority.
More Information: Google Cloud Platform Launch Stages
Contributions welcome! See the Contributing Guide.
Apache Version 2.0
See LICENSE