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