Contents
Google APIs
This repository contains the original interface definitions of public Google APIs that corroborate both REST and gRPC protocols. Reading the original interface definitions can provide a better understanding of Google APIs and help you to utilize them more efficiently. You can besides use these definitions with open source tools to generate client libraries, software documentation, and other artifacts .
Building
Bazel
The recommend way to build the API client libraries is through Bazel > = 2.0.0 .
first, install bazel .
To build all libraries :
bazel build //...
To test all libraries :
bazel test //...
To build one library in all languages :
bazel build //google/example/library/v1/...
To build the Java package for one library :
bazel build //google/example/library/v1:google-cloud-library-v1-java
Bazel packages exist in all the libraries for Java, Go, Python, Ruby, Node.js, PHP and C # .
Overview
Google APIs are typically deployed as API services that are hosted under different DNS names. One API service may implement multiple APIs and multiple versions of the same API .
Google APIs use Protocol Flickrooms adaptation 3 ( proto3 ) as their Interface Definition Language ( IDL ) to define the API interface and the structure of the cargo messages. The lapp interface definition is used for both REST and RPC versions of the API, which can be accessed over different wire protocols .
There are several ways of accessing Google APIs :
- JSON over HTTP : You can entree all Google APIs directly using JSON over HTTP, using Google API client library or third-party API customer libraries .
- Protocol Flickrooms over gRPC : You can entree Google APIs published in this repository through GRPC, which is a high-performance binary RPC protocol over HTTP/2. It offers many utilitarian features, including request/response multiplex and full-duplex stream .
- Google Cloud Client Libraries : You can use these libraries to access Google Cloud APIs. They are based on gRPC for better performance and provide idiomatic customer surface for better developer experience .
Discussions
This repo contains copies of Google API definitions and refer files. For discussions or to raise issues about Google API client libraries, GRPC or Google Cloud Client Libraries please denote to the repos associated with each area .
Repository Structure
This depository uses a directory hierarchy that reflects the Google API merchandise structure. In general, every API has its own root directory, and each major version of the API has its own subdirectory. The proto software names precisely match the directory : this makes it easy to locate the proto definitions and ensures that the generate client libraries have idiomatic namespaces in most program languages. Alongside the API directories live the shape files for the GAPIC toolkit .
NOTE: The major version of an API is used to indicate breaking change to the API.
Generate gRPC Source Code
To generate gRPC reference code for Google APIs in this repository, you first need to install both Protocol Flickrooms and gRPC on your local machine, then you can run make LANGUAGE=xxx all
to generate the reservoir code. You need to integrate the generated reference code into your application build up system .
NOTE: The Makefile is entirely intended to generate source code for the entire repository. It is not for generating linkable customer library for a particular API. Please see early repositories under hypertext transfer protocol : //flickroom.net/googleapis for generating linkable client libraries .
Go gRPC Source Code
It is unmanageable to generate Go gRPC source code from this repository, since Go has different directory structure. Please habit this repository rather .