AI-generated Key Takeaways
-
Leverage Google's language-specific client libraries for streamlined server-to-server communication with Fleet Engine, instead of using raw REST or gRPC.
-
Access protobuf files underpinning these clients from the designated GitHub repository for development purposes.
-
Utilize gRPC or Fleet Engine REST endpoints if client libraries are unavailable for your programming language.
-
For Java development, integrate the
com.google.maps:google-maps-fleetengine-delivery
library via Maven or Gradle, and utilize Application Default Credentials for authentication in trusted server environments. -
Explore experimental client libraries for Node.js/TypeScript, Go, Python, C#, PHP, and Ruby, offering varying levels of functionality and support.
For a better experience than developing over raw REST or gRPC for server-to-server communication, use Google's language-specific client libraries. Get the protobuf files these clients are based on by visiting the GitHub repository.
If libraries don't exist in your application's language, use gRPC or the Fleet Engine REST endpoints.
NOTE: Google Cloud Client Libraries are intended to run in trusted server
environments. JWTs are unnecessary. Use Application Default
Credentials
along with the appropriate deliveryAdmin
role.
Java
Java libraries are published to public Maven repositories as
com.google.maps:google-maps-fleetengine-delivery
.
Gradle
dependencies {
implementation 'com.google.maps:google-maps-fleetengine-delivery:latest.release'
}
Maven
<project>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-fleetengine-delivery</artifactId>
<version>LATEST</version>
</dependency>
</project>
See Java examples for interacting with the Fleet Engine API on the Get a delivery vehicle page.
Fleet Engine Authentication Library
You can use the Fleet Engine Authentication Library to create signed JSON web tokens in the Java environment. Fleet Engine uses JWTs to restrict access to Fleet Engine APIs in untrusted environments. The Fleet Engine Authentication Library simplifies construction of Fleet Engine JWTs in Java and securely signs them. For details, see Fleet Engine Authentication Library for Java.
The library provides the following benefits:
- Simplifies the process of creating Fleet Engine Tokens.
- Provides token signing mechanisms other than using credential files (such as impersonating a service account.)
Node.js / TypeScript
See https://www.npmjs.com/package/@googlemaps/fleetengine-delivery
npm
npm install @googlemaps/fleetengine-delivery
Go
The Go library is packaged as a module at https://pkg.go.dev/cloud.google.com/go/maps
Python
See https://pypi.org/project/google-maps-fleetengine-delivery/0.1.0/
pip
pip install google-auth
pip install google-maps-fleetengine-delivery
C#
Installation instructions for the C# library can be found at https://www.nuget.org/packages/Google.Maps.FleetEngine.Delivery.V1.
PHP
See https://packagist.org/packages/google/maps-fleetengine-delivery.
Ruby
See https://rubygems.org/gems/google-maps-fleet_engine-delivery.