Utility library and code samples for working with the Data Manager API and Java.
- Java 8+
The com.google.api-ads:data-manager-util utility library is published to
Maven Central.
For complete instructions on setting up API access and installing the client and utility libraries in your Maven or Gradle project, see the Set up API access and Install a client library guides.
-
data-manager-util: Source code and tests for thecom.google.api-ads:data-manager-utilMaven artifact. Use the utilities in the library to help with common tasks like formatting, hashing, encrypting, and encoding data for Data Manager API requests. -
data-manager-samples: Code samples demonstrating how to construct and send requests to the Data Manager API using thecom.google.api-ads:data-managerclient library and thecom.google.api-ads:data-manager-utilutility library. Check out the samples directory for runnable examples.
To run a sample, invoke the sample using the Gradle run task from the command
line. The first argument should be the simple class name of the sample, such as
IngestEvents.
You can pass arguments to a sample in one of two ways:
./gradlew run --args="IngestEvents
--operatingAccountType <operating_account_type>
--operatingAccountId <operating_account_id>
--conversionActionId <conversion_action_id>
--jsonFile '</path/to/your/file>'"Quote any argument that contains a space.
You can also save arguments in a file. Don't quote argument values in your arguments file, even if the value contains a space.
--operatingAccountType <operating_account_type>
--operatingAccountId <operating_account_id>
--conversionActionId <conversion_action_id>
--jsonFile </path/to/your/file>
The first example used one line per argument pair. You can also put each argument on a separate line if you'd prefer that format.
--operatingAccountType
<operating_account_type>
--operatingAccountId
<operating_account_id>
--conversionActionId
<conversion_action_id>
--jsonFile
</path/to/your/file>
Then, run the sample by passing:
- The simple class name of the sample.
- The file path prefixed with the
@character.
./gradlew run --args="IngestEvents @/path/to/your/argsfile"Contributions welcome! See the Contributing Guide.