...

Source file src/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/entitysearch/client.go

Documentation: github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/entitysearch

     1  // Package entitysearch implements the Azure ARM Entitysearch service API version 1.0.
     2  //
     3  // The Entity Search API lets you send a search query to Bing and get back search results that include entities and
     4  // places. Place results include restaurants, hotel, or other local businesses. For places, the query can specify the
     5  // name of the local business or it can ask for a list (for example, restaurants near me). Entity results include
     6  // persons, places, or things. Place in this context is tourist attractions, states, countries, etc.
     7  package entitysearch
     8  
     9  // Copyright (c) Microsoft Corporation. All rights reserved.
    10  // Licensed under the MIT License. See License.txt in the project root for license information.
    11  //
    12  // Code generated by Microsoft (R) AutoRest Code Generator.
    13  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
    14  
    15  import (
    16  	"github.com/Azure/go-autorest/autorest"
    17  )
    18  
    19  const (
    20  	// DefaultEndpoint is the default value for endpoint
    21  	DefaultEndpoint = "https://api.cognitive.microsoft.com"
    22  )
    23  
    24  // BaseClient is the base client for Entitysearch.
    25  type BaseClient struct {
    26  	autorest.Client
    27  	Endpoint string
    28  }
    29  
    30  // New creates an instance of the BaseClient client.
    31  func New() BaseClient {
    32  	return NewWithoutDefaults(DefaultEndpoint)
    33  }
    34  
    35  // NewWithoutDefaults creates an instance of the BaseClient client.
    36  func NewWithoutDefaults(endpoint string) BaseClient {
    37  	return BaseClient{
    38  		Client:   autorest.NewClientWithUserAgent(UserAgent()),
    39  		Endpoint: endpoint,
    40  	}
    41  }
    42  

View as plain text