NewsOperations class
Class representing a NewsOperations.
Constructors
News |
Create a NewsOperations. |
Methods
Constructor Details
NewsOperations(NewsSearchClientContext)
Create a NewsOperations.
new NewsOperations(client: NewsSearchClientContext)
Parameters
- client
- NewsSearchClientContext
Reference to the service client.
Method Details
category(NewsCategoryOptionalParams)
function category(options?: NewsCategoryOptionalParams): Promise<NewsCategoryResponse>
Parameters
- options
- NewsCategoryOptionalParams
The optional parameters
Returns
Promise<NewsCategoryResponse>
Promise<Models.NewsCategoryResponse>
category(NewsCategoryOptionalParams, ServiceCallback<News>)
function category(options: NewsCategoryOptionalParams, callback: ServiceCallback<News>)
Parameters
- options
- NewsCategoryOptionalParams
The optional parameters
- callback
The callback
category(ServiceCallback<News>)
function category(callback: ServiceCallback<News>)
Parameters
- callback
The callback
search(string, NewsSearchOptionalParams)
function search(query: string, options?: NewsSearchOptionalParams): Promise<NewsSearchResponse>
Parameters
- query
-
string
The user's search query string. The query string cannot be empty. The query string may contain Bing Advanced Operators. For example, to limit news to a specific domain, use the site: operator. Use this parameter only with the News Search API. Do not specify this parameter when calling the Trending Topics API or News Category API.
- options
- NewsSearchOptionalParams
The optional parameters
Returns
Promise<NewsSearchResponse>
Promise<Models.NewsSearchResponse>
search(string, NewsSearchOptionalParams, ServiceCallback<News>)
function search(query: string, options: NewsSearchOptionalParams, callback: ServiceCallback<News>)
Parameters
- query
-
string
The user's search query string. The query string cannot be empty. The query string may contain Bing Advanced Operators. For example, to limit news to a specific domain, use the site: operator. Use this parameter only with the News Search API. Do not specify this parameter when calling the Trending Topics API or News Category API.
- options
- NewsSearchOptionalParams
The optional parameters
- callback
The callback
search(string, ServiceCallback<News>)
function search(query: string, callback: ServiceCallback<News>)
Parameters
- query
-
string
The user's search query string. The query string cannot be empty. The query string may contain Bing Advanced Operators. For example, to limit news to a specific domain, use the site: operator. Use this parameter only with the News Search API. Do not specify this parameter when calling the Trending Topics API or News Category API.
- callback
The callback
trending(NewsTrendingOptionalParams)
function trending(options?: NewsTrendingOptionalParams): Promise<NewsTrendingResponse>
Parameters
- options
- NewsTrendingOptionalParams
The optional parameters
Returns
Promise<NewsTrendingResponse>
Promise<Models.NewsTrendingResponse>
trending(NewsTrendingOptionalParams, ServiceCallback<TrendingTopics>)
function trending(options: NewsTrendingOptionalParams, callback: ServiceCallback<TrendingTopics>)
Parameters
- options
- NewsTrendingOptionalParams
The optional parameters
- callback
The callback
trending(ServiceCallback<TrendingTopics>)
function trending(callback: ServiceCallback<TrendingTopics>)
Parameters
- callback
The callback