The Replica Pool API is built on HTTP and JSON, so any standard HTTP client can send requests to it and parse the responses.
However, instead of creating HTTP requests and parsing responses manually, you may want to use client libraries to do so. Client libraries provide better language integration, improved security, and support for making calls that require user authorization.
You can use the Replica Pool API through a number of Google-provided libraries.
Available libraries
Library | Language(s) | Vendor | Website | Getting started on Replica Pool |
---|---|---|---|---|
Google APIs Java Client Library | Java | Website | Documentation | |
Google APIs .NET Client Library | .NET | Website | Documentation | |
Google APIs Go Client Library | Go | Website | Documentation | |
Google APIs JavaScript Client Library | Javascript | Website | Documentation | |
Google APIs Ruby Client Library | Ruby | Website | Documentation | |
Google APIs Node.js Client Library | Node.js | Website | Documentation | |
Google API Objective C Client Library | Objective C | Website | Documentation | |
Google API PHP Client Library | PHP | Website | Documentation | |
Google API Python Client Library | Python | Website | Documentation |
Google APIs Java Client Library
This page contains information about getting started with the Replica Pool API using the Google APIs Client Library for Java. In addition, you may be interested in the following documentation:
- Browse the JavaDoc reference for the Replica Pool API .
- Read the Developer's guide for the Google APIs Client Library for Java .
- Interact with this API in your browser using the APIs Explorer for the Replica Pool API .
Add Library to Your Project
Select your build environment (Maven or Gradle) from the following tabs, or download a zip file containing all of the jars you need:
Download the Replica Pool API v1beta1 Client Library for Java
.
See the
The
Add the following to your
See
all versions available on the Maven Central Repository
.
Add the following to your
See
all versions available on the Maven Central Repository
.
replicapool/readme.html
file for details on:
libs
folder contains all the of the globally-applicable dependencies you might need across all application types.
pom.xml
file:
build.gradle
file:
Google APIs .NET Client Library
This page contains information about getting started with the Replica Pool API using the Google APIs Client Library for .NET. In addition, you may be interested in the following documentation:
- Browse the .NET reference documentation for the Replica Pool API .
- Read the Developer's guide for the Google APIs Client Library for .NET .
- Interact with this API in your browser using the APIs Explorer for the Replica Pool API .
Downloading the library
Install a NuGet package from those available at Google.Apis.replicapool .
Google APIs Go Client Library
This section contains information about getting started with the Replica Pool API using the Google APIs Go client library. In addition, you may be interested in the following documentation:
- Read the getting started guide for the Google APIs Go client library.
- Interact with the API in the browser, using the Google APIs Explorer .
Downloading and installing the library
To install the library, run the following command:
$ go get code.google.com/p/google-api-go-client/replicapool/v1beta1
Using the library
Import the library in your code:
package main import ( "code.google.com/p/google-api-go-client/replicapool/v1beta1" )
Google APIs JavaScript Client Library
This section contains information about getting started with the Replica Pool API using the Google APIs JavaScript client library. In addition, you may be interested in the following documentation:
- Read the getting started guide .
- Learn how to develop using the JavaScript client library .
- Interact with the API in the browser, using the Google APIs Explorer .
Using the API
To use the API, you must first load the library. In you code, add:
<script src="https://apis.google.com/js/client.js?onload=handleClientLoad"></script>
Google APIs Ruby Client Library
This page contains information about getting started with the Replica Pool API using the Google APIs Client Library for Ruby. In addition, you may be interested in the following documentation:
- Read the Getting started guide for the Google APIs Client Library for Ruby .
- Interact with this API in your browser using the APIs Explorer for the Replica Pool API .
Installing the google-api-client gem
If you haven't installed the Google APIs Client Library for Ruby before, open a terminal and install using
RubyGems
:
$ gem install google-api-client
If you already have the gem installed and would simply like to update to the latest version:
$ gem update -y google-api-client
Depending on your system, you may need to prepend these commands with
sudo
.
Getting started with the Google APIs Client Library for Ruby
Be sure to check our extensive Getting started guide for a quick overview of how to make your first request.
Google APIs Node.js Client Library
This section contains information about getting started with the Replica Pool API using the Google APIs Node.js client library. In addition, you may be interested in the following documentation:
- Read the overview on GitHub .
- Interact with the API in the browser, using the Google APIs Explorer .
Installing the library
To install the Node.js library, you must use npm :
$ npm install googleapis
Using the library
Use the library to dynamically load your desired APIs:
var googleapis = require('googleapis'); googleapis .discover('replicapool', 'v1beta1') .execute(function(err, client) { if (err) { console.log('Problem during the client discovery.', err); return; }
Google APIs Objective C Client Library
This section contains information about getting started with the Replica Pool API using the Google APIs Objective C client library. In addition, you may be interested in the following documentation:
- Read the overview .
- Interact with the API in the browser, using the Google APIs Explorer .
Linking to the library
Follow the instructions to add the Google APIs Objective-C Client Library to a Project .
Google APIs PHP Client Library
This section contains information about getting started with the Replica Pool API using the Google APIs PHP client library. In addition, you may be interested in the following documentation:
- Read the Installation guide .
- Get the library from GitHub .
- Interact with the API in the browser, using the Google APIs Explorer .
Downloading the library
The library can be installed by adding it as a dependency to your composer.json.
"require": { "google/apiclient": "1.0.*" }
If you prefer, the library is available on GitHub and can be cloned into a local repository with the git clone method.
git clone https://github.com/google/google-api-php-client.git .
Using the library
The best way to define the location of library files is to add it to the path in the PHP.ini configuration file.
include_path = ".:/usr/local/lib/php:/path/to/google-api-php-client/src"
Alternatively, the same ini directive can be set dynamically in your code.
set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/google-api-php-client/src');
Google APIs Python Client Library
This page contains information about getting started with the Replica Pool API using the Google APIs Client Library for Python. In addition, you may be interested in the following documentation:
- Browse the PyDoc reference for the Replica Pool API .
- Read the Developer's guide for the Google APIs Client Library for Python .
- Interact with this API in your browser using the APIs Explorer for the Replica Pool API .
System requirements
-
Operating systems
:
- Linux
- Mac OS X
- Windows
Note : This library is pure Python, so other operating systems with Python support may work as well.
- The latest version of Python 2 .
- Python package installation manager : Setuptools or pip .
Manual Installation
To install the library and all of its dependencies, open a terminal and do one of the following:
-
Use the
easy_install
tool included in the setuptools package:$ easy_install --upgrade google-api-python-client
-
Use the pip tool:
$ pip install --upgrade google-api-python-client
Depending on your system, you may need to prepend those commands with
sudo
.
App Engine
Because
Google App Engine
requires that all of the source files for a library must be present in your App
Engine project, there is a special installation procedure for App Engine. To
install the library and all of its dependencies in an App Engine project,
download the file named
google-api-python-client-gae-
N.M
.zip
from the
list
of downloads
, where
N.M
is the version number of the latest release. Unzip
that file into your project. For example:
$ cd myproject $ unzip google-api-python-client-gae-1.1.zip