This repository contains the alpha version of the Merchant API. It is intended for testing and demonstration purposes to showcase experimental features and changes.
For more information on the API, please refer to the documentation for the Merchant API.
Please be aware that contributions are not accepted through GitHub. For any feedback, suggestions, or support, please direct them to the Merchant API Support Form.
The alpha client libraries are provided as tarballs within their respective
API directories, under the path google/shopping/merchant/<api>/v1alpha,
where <api> is the API name (e.g., reviews).
Below are instructions on how to install and use these libraries locally in
your project.
Replace <api> and <Api-Capitalized> with the actual values for the
library you are using.
Option 1: Local NuGet Package (Recommended)
- Extract the tarball:
tar -xf google/shopping/merchant/<api>/v1alpha/google-cloud-merchant-<api>-v1alpha-csharp.tar.gz
- Pack the project:
cd google-cloud-merchant-<api>-v1alpha-csharp/Google.Shopping.Merchant.<Api-Capitalized>.V1Alpha dotnet pack -c Release -o ./nupkg
- Add the package to your project pointing to the local source:
dotnet add package Google.Shopping.Merchant.<Api-Capitalized>.V1Alpha -s ./nupkg
Option 2: Direct Project Reference
If you prefer to reference the project directly in your .csproj:
<ItemGroup>
<ProjectReference Include="path/to/extracted/google-cloud-merchant-<api>-v1alpha-csharp/Google.Shopping.Merchant.<Api-Capitalized>.V1Alpha/Google.Shopping.Merchant.<Api-Capitalized>.V1Alpha.csproj" />
</ItemGroup>Since these libraries are designed to be part of the google-cloud-go
monorepo, you need to merge them into a local clone:
- Clone the public Go client library repository:
git clone https://github.com/googleapis/google-cloud-go export CLOUD_GO=`pwd`/google-cloud-go
- Extract the alpha library tarball and copy the sources to your clone:
tar -xf google/shopping/merchant/<api>/v1alpha/gapi-cloud-merchant-<api>-v1alpha-go.tar.gz cp -r ./cloud.google.com/go/* $CLOUD_GO/
- In your project's
go.mod, redirect the dependency to your local clone:replace cloud.google.com/go => /path/to/local/google-cloud-go
- Extract the tarball:
tar -xf google/shopping/merchant/<api>/v1alpha/google-cloud-merchant-<api>-v1alpha-java.tar.gz
- Generate the Gradle wrapper and build and install to your local Maven cache
(
~/.m2). This requires a local Gradle installation:cd google-cloud-merchant-<api>-v1alpha-java gradle wrapper --gradle-version 7.6.4 ./gradlew publishToMavenLocal
- Add the dependency to your project:
- For Maven (
pom.xml):<dependency> <groupId>com.google.cloud</groupId> <artifactId>gapic-google-cloud-merchant-<api>-v1alpha-java</artifactId> <version>0.0.0-SNAPSHOT</version> </dependency>
- For Gradle (
build.gradle):implementation 'com.google.cloud:gapic-google-cloud-merchant-<api>-v1alpha-java:0.0.0-SNAPSHOT'
- For Maven (
NPM supports local installs via the tarball package. Since the source may need compilation:
- Extract the tarball:
tar -xf google/shopping/merchant/<api>/v1alpha/merchant-<api>-v1alpha-nodejs.tar.gz
- Build and pack the library:
This will generate a
cd merchant-<api>-v1alpha-nodejs npm install npm pack
.tgzfile (e.g.,google-cloud-<api>-0.1.0.tgzor similar, check the output ofnpm pack). - Install the generated
.tgzin your target project:npm install /path/to/merchant-<api>-v1alpha-nodejs/<generated-file>.tgz
- Extract the tarball:
tar -xf google/shopping/merchant/<api>/v1alpha/google-cloud-merchant-<api>-v1alpha-php.tar.gz
- Move the extracted folder into your PHP project.
- Configure your
composer.jsonto require GAX and useclassmapfor autoloading:{ "require": { "google/gax": "^1.34" }, "autoload": { "classmap": [ "google-cloud-merchant-<api>-v1alpha-php/src", "google-cloud-merchant-<api>-v1alpha-php/proto/src" ] } } - Run
composer updateto regenerate the autoloader.
You can install the library directly from the tarball using pip:
pip install google/shopping/merchant/<api>/v1alpha/merchant-<api>-v1alpha-py.tar.gz- Extract the tarball:
tar -xf google/shopping/merchant/<api>/v1alpha/google-cloud-merchant-<api>-v1alpha-ruby.tar.gz
- Build and install the gem locally:
cd google-cloud-merchant-<api>-v1alpha-ruby gem build google-cloud-merchant-<api>-v1alpha.gemspec gem install google-cloud-merchant-<api>-v1alpha-*.gem