This page shows how to get started with the client libraries for
Maps Datasets API.

Read more about the client libraries in [Client Libraries
Explained](https://cloud.google.com/apis/docs/client-libraries-explained).

## Install the client library

### Node.js

For more information, see [Setting Up a Node.js Development Environment](https://cloud.google.com/nodejs/docs/setup).

```
npm install @googlemaps/maps-platform-datasets
```

### Python

For more information, see [Setting Up a Python Development Environment](https://cloud.google.com/python/docs/setup).

```
pip install --upgrade google-maps-mapsplatformdatasets
```

## Set up authentication

When you use client libraries, you use
[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials)
to authenticate. For information about setting up ADC, see
[Provide credentials for Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).
For information about using ADC with client libraries, see
[Authenticate using client libraries](https://cloud.google.com/docs/authentication/client-libraries).

## Use the client library

### Node.js

[View on GitHub](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js)

```javascript
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Parent project that will own the dataset.
 *  Format: projects/{project}
 */
// const parent = 'abc123'
/**
 *  Required. The dataset version to create.
 */
// const dataset = {}

// Imports the Mapsplatformdatasets library
const {MapsPlatformDatasetsClient} = require('@googlemaps/maps-platform-datasets').v1;

// Instantiates a client
const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();

async function callCreateDataset() {
  // Construct request
  const request = {
    parent,
    dataset,
  };

  // Run request
  const response = await mapsplatformdatasetsClient.createDataset(request);
  console.log(response);
}

callCreateDataset();
```

### Python

[View on GitHub](https://github.com/googleapis/google-cloud-python/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated_samples/mapsplatformdatasets_v1_generated_maps_platform_datasets_create_dataset_sync.py)

```python
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import mapsplatformdatasets_v1


def sample_create_dataset():
    # Create a client
    client = mapsplatformdatasets_v1.MapsPlatformDatasetsClient()

    # Initialize request argument(s)
    request = mapsplatformdatasets_v1.CreateDatasetRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_dataset(request=request)

    # Handle the response
    print(response)

```

## Additional resources

### Node.js

- [Source Code](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-mapsplatformdatasets)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-node/issues)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-geocoding-api+node.js)

### Python

- [Source Code](https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-mapsplatformdatasets)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-python/issues)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-geocoding-api+python)