...

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

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

     1  // Package imagesearch implements the Azure ARM Imagesearch service API version 1.0.
     2  //
     3  // The Image Search API lets you send a search query to Bing and get back a list of relevant images. This section
     4  // provides technical details about the query parameters and headers that you use to request images and the JSON
     5  // response objects that contain them. For examples that show how to make requests, see [Searching the Web for
     6  // Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web).
     7  package imagesearch
     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 Imagesearch.
    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