Show / Hide Table of Contents

Class AreaInsightsClient

AreaInsights client wrapper, for convenient use.

Inheritance
object
AreaInsightsClient
AreaInsightsClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Maps.AreaInsights.V1
Assembly: Google.Maps.AreaInsights.V1.dll
Syntax
public abstract class AreaInsightsClient
Remarks

Service definition for the Places Insights API.

Properties

DefaultEndpoint

The default endpoint for the AreaInsights service, which is a host of "areainsights.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default AreaInsights scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default AreaInsights scopes are:

  • https://www.googleapis.com/auth/cloud-platform

GrpcClient

The underlying gRPC AreaInsights client

Declaration
public virtual AreaInsights.AreaInsightsClient GrpcClient { get; }
Property Value
Type Description
AreaInsights.AreaInsightsClient

ServiceMetadata

The service metadata associated with this client type.

Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type Description
ServiceMetadata

Methods

ComputeInsights(ComputeInsightsRequest, CallSettings)

Compute Insights RPC

This method lets you retrieve insights about areas using a variaty of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see insight enum for more details). With "places" insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.

Declaration
public virtual ComputeInsightsResponse ComputeInsights(ComputeInsightsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ComputeInsightsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ComputeInsightsResponse

The RPC response.

Sample code
// Create client
AreaInsightsClient areaInsightsClient = AreaInsightsClient.Create();
// Initialize request argument(s)
ComputeInsightsRequest request = new ComputeInsightsRequest
{
    Insights =
    {
        Insight.Unspecified,
    },
    Filter = new Filter(),
};
// Make the request
ComputeInsightsResponse response = areaInsightsClient.ComputeInsights(request);

ComputeInsightsAsync(ComputeInsightsRequest, CallSettings)

Compute Insights RPC

This method lets you retrieve insights about areas using a variaty of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see insight enum for more details). With "places" insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.

Declaration
public virtual Task<ComputeInsightsResponse> ComputeInsightsAsync(ComputeInsightsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ComputeInsightsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ComputeInsightsResponse>

A Task containing the RPC response.

Sample code
// Create client
AreaInsightsClient areaInsightsClient = await AreaInsightsClient.CreateAsync();
// Initialize request argument(s)
ComputeInsightsRequest request = new ComputeInsightsRequest
{
    Insights =
    {
        Insight.Unspecified,
    },
    Filter = new Filter(),
};
// Make the request
ComputeInsightsResponse response = await areaInsightsClient.ComputeInsightsAsync(request);

ComputeInsightsAsync(ComputeInsightsRequest, CancellationToken)

Compute Insights RPC

This method lets you retrieve insights about areas using a variaty of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see insight enum for more details). With "places" insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.

Declaration
public virtual Task<ComputeInsightsResponse> ComputeInsightsAsync(ComputeInsightsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
ComputeInsightsRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ComputeInsightsResponse>

A Task containing the RPC response.

Sample code
// Create client
AreaInsightsClient areaInsightsClient = await AreaInsightsClient.CreateAsync();
// Initialize request argument(s)
ComputeInsightsRequest request = new ComputeInsightsRequest
{
    Insights =
    {
        Insight.Unspecified,
    },
    Filter = new Filter(),
};
// Make the request
ComputeInsightsResponse response = await areaInsightsClient.ComputeInsightsAsync(request);

Create()

Synchronously creates a AreaInsightsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AreaInsightsClientBuilder.

Declaration
public static AreaInsightsClient Create()
Returns
Type Description
AreaInsightsClient

The created AreaInsightsClient.

CreateAsync(CancellationToken)

Asynchronously creates a AreaInsightsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AreaInsightsClientBuilder.

Declaration
public static Task<AreaInsightsClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AreaInsightsClient>

The task representing the created AreaInsightsClient.

ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

In this article
Back to top Generated by DocFX