1 <img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
3 # [googleapis Proto Files: Node.js Client](https://github.com/googleapis/nodejs-proto-files)
5 [![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
6 [![npm version](https://img.shields.io/npm/v/google-proto-files.svg)](https://www.npmjs.org/package/google-proto-files)
7 [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-proto-files/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-proto-files)
9 > Get a copy of the [googleapis](https://github.com/googleapis/googleapis) proto files into your project.
11 * [github.com/googleapis/nodejs-proto-files](https://github.com/googleapis/nodejs-proto-files)
13 Read more about the client libraries for Cloud APIs, including the older
14 Google APIs Client Libraries, in [Client Libraries Explained][explained].
16 [explained]: https://cloud.google.com/apis/docs/client-libraries-explained
18 **Table of contents:**
21 * [Versioning](#versioning)
22 * [Contributing](#contributing)
28 $ npm install --save google-proto-files
31 const protoFiles = require('google-proto-files')
34 ### Get a directory path by executing as a function
36 protoFiles('logging', 'v2')
37 // node_modules/google-proto-files/google/logging/v2
40 ### Get a path to the entry proto file for a specific API version
43 // node_modules/google-proto-files/google/pubsub/v1/pubsub.proto
46 ## load|loadSync(fileName, [options])
48 ### [options](https://github.com/dcodeIO/protobuf.js/blob/master/src/parse.js#L42-L44)
50 ### Load a proto which depends on google common protos.
53 protoFiles.load('path/to/file.proto').then(function(root) {
54 const MyService = root.lookup('example.MyService')
60 const root = protoFiles.loadSync('path/to/file.proto');
61 const MyService = root.lookup('example.MyService');
66 This library follows [Semantic Versioning](http://semver.org/).
68 This library is considered to be in **alpha**. This means it is still a
69 work-in-progress and under active development. Any release is subject to
70 backwards-incompatible changes at any time.
72 More Information: [Google Cloud Platform Launch Stages][launch_stages]
74 [launch_stages]: https://cloud.google.com/terms/launch-stages
78 Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-proto-files/blob/master/CONTRIBUTING.md).
84 See [LICENSE](https://github.com/googleapis/nodejs-proto-files/blob/master/LICENSE)