customsearch

package
v53.3.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package customsearch implements the Azure ARM Customsearch service API version 1.0.

The Bing Custom Search API lets you send a search query to Bing and get back search results customized to meet your custom search definition.

Index

Constants

View Source
const (
	// DefaultEndpoint is the default value for endpoint
	DefaultEndpoint = "https://api.cognitive.microsoft.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type Answer

type Answer struct {
	// FollowUpQueries - READ-ONLY
	FollowUpQueries *[]Query `json:"followUpQueries,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

Answer ...

func (Answer) AsAnswer

func (a Answer) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicAnswer

func (a Answer) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicCreativeWork

func (a Answer) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicIdentifiable

func (a Answer) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicResponse

func (a Answer) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicResponseBase

func (a Answer) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicSearchResultsAnswer

func (a Answer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Answer.

func (Answer) AsBasicThing

func (a Answer) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for Answer.

func (Answer) AsCreativeWork

func (a Answer) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for Answer.

func (Answer) AsErrorResponse

func (a Answer) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for Answer.

func (Answer) AsIdentifiable

func (a Answer) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for Answer.

func (Answer) AsResponse

func (a Answer) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for Answer.

func (Answer) AsResponseBase

func (a Answer) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for Answer.

func (Answer) AsSearchResponse

func (a Answer) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for Answer.

func (Answer) AsSearchResultsAnswer

func (a Answer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for Answer.

func (Answer) AsThing

func (a Answer) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for Answer.

func (Answer) AsWebPage

func (a Answer) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for Answer.

func (Answer) AsWebWebAnswer

func (a Answer) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for Answer.

func (Answer) MarshalJSON

func (a Answer) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Answer.

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Customsearch.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type BasicAnswer

type BasicAnswer interface {
	AsWebWebAnswer() (*WebWebAnswer, bool)
	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
	AsAnswer() (*Answer, bool)
}

BasicAnswer ...

type BasicCreativeWork

type BasicCreativeWork interface {
	AsWebPage() (*WebPage, bool)
	AsCreativeWork() (*CreativeWork, bool)
}

BasicCreativeWork ...

type BasicIdentifiable

type BasicIdentifiable interface {
	AsWebPage() (*WebPage, bool)
	AsWebWebAnswer() (*WebWebAnswer, bool)
	AsSearchResponse() (*SearchResponse, bool)
	AsResponse() (*Response, bool)
	AsBasicResponse() (BasicResponse, bool)
	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
	AsErrorResponse() (*ErrorResponse, bool)
	AsAnswer() (*Answer, bool)
	AsBasicAnswer() (BasicAnswer, bool)
	AsThing() (*Thing, bool)
	AsBasicThing() (BasicThing, bool)
	AsCreativeWork() (*CreativeWork, bool)
	AsBasicCreativeWork() (BasicCreativeWork, bool)
	AsIdentifiable() (*Identifiable, bool)
}

BasicIdentifiable defines the identity of a resource.

type BasicResponse

type BasicResponse interface {
	AsWebPage() (*WebPage, bool)
	AsWebWebAnswer() (*WebWebAnswer, bool)
	AsSearchResponse() (*SearchResponse, bool)
	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
	AsErrorResponse() (*ErrorResponse, bool)
	AsAnswer() (*Answer, bool)
	AsBasicAnswer() (BasicAnswer, bool)
	AsThing() (*Thing, bool)
	AsBasicThing() (BasicThing, bool)
	AsCreativeWork() (*CreativeWork, bool)
	AsBasicCreativeWork() (BasicCreativeWork, bool)
	AsResponse() (*Response, bool)
}

BasicResponse defines a response. All schemas that could be returned at the root of a response should inherit from this

type BasicResponseBase

type BasicResponseBase interface {
	AsWebPage() (*WebPage, bool)
	AsWebWebAnswer() (*WebWebAnswer, bool)
	AsSearchResponse() (*SearchResponse, bool)
	AsResponse() (*Response, bool)
	AsBasicResponse() (BasicResponse, bool)
	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
	AsIdentifiable() (*Identifiable, bool)
	AsBasicIdentifiable() (BasicIdentifiable, bool)
	AsErrorResponse() (*ErrorResponse, bool)
	AsAnswer() (*Answer, bool)
	AsBasicAnswer() (BasicAnswer, bool)
	AsThing() (*Thing, bool)
	AsBasicThing() (BasicThing, bool)
	AsCreativeWork() (*CreativeWork, bool)
	AsBasicCreativeWork() (BasicCreativeWork, bool)
	AsResponseBase() (*ResponseBase, bool)
}

BasicResponseBase ...

type BasicSearchResultsAnswer

type BasicSearchResultsAnswer interface {
	AsWebWebAnswer() (*WebWebAnswer, bool)
	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
}

BasicSearchResultsAnswer ...

type BasicThing

type BasicThing interface {
	AsWebPage() (*WebPage, bool)
	AsCreativeWork() (*CreativeWork, bool)
	AsBasicCreativeWork() (BasicCreativeWork, bool)
	AsThing() (*Thing, bool)
}

BasicThing ...

type CreativeWork

type CreativeWork struct {
	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
	// Provider - READ-ONLY; The source of the creative work.
	Provider *[]BasicThing `json:"provider,omitempty"`
	// Text - READ-ONLY
	Text *string `json:"text,omitempty"`
	// Name - READ-ONLY; The name of the thing represented by this object.
	Name *string `json:"name,omitempty"`
	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
	URL *string `json:"url,omitempty"`
	// Description - READ-ONLY; A short description of the item.
	Description *string `json:"description,omitempty"`
	// BingID - READ-ONLY; An ID that uniquely identifies this item.
	BingID *string `json:"bingId,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

CreativeWork ...

func (CreativeWork) AsAnswer

func (cw CreativeWork) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicAnswer

func (cw CreativeWork) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicCreativeWork

func (cw CreativeWork) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicIdentifiable

func (cw CreativeWork) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicResponse

func (cw CreativeWork) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicResponseBase

func (cw CreativeWork) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicSearchResultsAnswer

func (cw CreativeWork) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsBasicThing

func (cw CreativeWork) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsCreativeWork

func (cw CreativeWork) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsErrorResponse

func (cw CreativeWork) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsIdentifiable

func (cw CreativeWork) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsResponse

func (cw CreativeWork) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsResponseBase

func (cw CreativeWork) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsSearchResponse

func (cw CreativeWork) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsSearchResultsAnswer

func (cw CreativeWork) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsThing

func (cw CreativeWork) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsWebPage

func (cw CreativeWork) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) AsWebWebAnswer

func (cw CreativeWork) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for CreativeWork.

func (CreativeWork) MarshalJSON

func (cw CreativeWork) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CreativeWork.

func (*CreativeWork) UnmarshalJSON

func (cw *CreativeWork) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for CreativeWork struct.

type CustomInstanceClient

type CustomInstanceClient struct {
	BaseClient
}

CustomInstanceClient is the the Bing Custom Search API lets you send a search query to Bing and get back search results customized to meet your custom search definition.

func NewCustomInstanceClient

func NewCustomInstanceClient() CustomInstanceClient

NewCustomInstanceClient creates an instance of the CustomInstanceClient client.

func (CustomInstanceClient) Search

func (client CustomInstanceClient) Search(ctx context.Context, customConfig string, query string, acceptLanguage string, userAgent string, clientID string, clientIP string, location string, countryCode string, count *int32, market string, offset *int32, safeSearch SafeSearch, setLang string, textDecorations *bool, textFormat TextFormat) (result SearchResponse, err error)

Search sends the search request. Parameters: customConfig - the identifier for the custom search configuration query - the user's search query term. The term may not be empty. The term may contain Bing Advanced Operators. For example, to limit results to a specific domain, use the site: operator. acceptLanguage - a comma-delimited list of one or more languages to use for user interface strings. The list is in decreasing order of preference. For additional information, including expected format, see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This header and the setLang query parameter are mutually exclusive; do not specify both. If you set this header, you must also specify the cc query parameter. Bing will use the first supported language it finds from the list, and combine that language with the cc parameter value to determine the market to return results for. If the list does not include a supported language, Bing will find the closest language and market that supports the request, and may use an aggregated or default market for the results instead of a specified one. You should use this header and the cc query parameter only if you specify multiple languages; otherwise, you should use the mkt and setLang query parameters. A user interface string is a string that's used as a label in a user interface. There are very few user interface strings in the JSON response objects. Any links in the response objects to Bing.com properties will apply the specified language. userAgent - the user agent originating the request. Bing uses the user agent to provide mobile users with an optimized experience. Although optional, you are strongly encouraged to always specify this header. The user-agent should be the same string that any commonly used browser would send. For information about user agents, see [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). clientID - bing uses this header to provide users with consistent behavior across Bing API calls. Bing often flights new features and improvements, and it uses the client ID as a key for assigning traffic on different flights. If you do not use the same client ID for a user across multiple requests, then Bing may assign the user to multiple conflicting flights. Being assigned to multiple conflicting flights can lead to an inconsistent user experience. For example, if the second request has a different flight assignment than the first, the experience may be unexpected. Also, Bing can use the client ID to tailor web results to that client ID’s search history, providing a richer experience for the user. Bing also uses this header to help improve result rankings by analyzing the activity generated by a client ID. The relevance improvements help with better quality of results delivered by Bing APIs and in turn enables higher click-through rates for the API consumer. IMPORTANT: Although optional, you should consider this header required. Persisting the client ID across multiple requests for the same end user and device combination enables 1) the API consumer to receive a consistent user experience, and 2) higher click-through rates via better quality of results from the Bing APIs. Each user that uses your application on the device must have a unique, Bing generated client ID. If you do not include this header in the request, Bing generates an ID and returns it in the X-MSEdge-ClientID response header. The only time that you should NOT include this header in a request is the first time the user uses your app on that device. Use the client ID for each Bing API request that your app makes for this user on the device. Persist the client ID. To persist the ID in a browser app, use a persistent HTTP cookie to ensure the ID is used across all sessions. Do not use a session cookie. For other apps such as mobile apps, use the device's persistent storage to persist the ID. The next time the user uses your app on that device, get the client ID that you persisted. Bing responses may or may not include this header. If the response includes this header, capture the client ID and use it for all subsequent Bing requests for the user on that device. If you include the X-MSEdge-ClientID, you must not include cookies in the request. clientIP - the IPv4 or IPv6 address of the client device. The IP address is used to discover the user's location. Bing uses the location information to determine safe search behavior. Although optional, you are encouraged to always specify this header and the X-Search-Location header. Do not obfuscate the address (for example, by changing the last octet to 0). Obfuscating the address results in the location not being anywhere near the device's actual location, which may result in Bing serving erroneous results. location - a semicolon-delimited list of key/value pairs that describe the client's geographical location. Bing uses the location information to determine safe search behavior and to return relevant local content. Specify the key/value pair as <key>:<value>. The following are the keys that you use to specify the user's location. lat (required): The latitude of the client's location, in degrees. The latitude must be greater than or equal to -90.0 and less than or equal to +90.0. Negative values indicate southern latitudes and positive values indicate northern latitudes. long (required): The longitude of the client's location, in degrees. The longitude must be greater than or equal to -180.0 and less than or equal to +180.0. Negative values indicate western longitudes and positive values indicate eastern longitudes. re (required): The radius, in meters, which specifies the horizontal accuracy of the coordinates. Pass the value returned by the device's location service. Typical values might be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the client was at the location. (The UNIX timestamp is the number of seconds since January 1, 1970.) head (optional): The client's relative heading or direction of travel. Specify the direction of travel as degrees from 0 through 360, counting clockwise relative to true north. Specify this key only if the sp key is nonzero. sp (optional): The horizontal velocity (speed), in meters per second, that the client device is traveling. alt (optional): The altitude of the client device, in meters. are (optional): The radius, in meters, that specifies the vertical accuracy of the coordinates. Specify this key only if you specify the alt key. Although many of the keys are optional, the more information that you provide, the more accurate the location results are. Although optional, you are encouraged to always specify the user's geographical location. Providing the location is especially important if the client's IP address does not accurately reflect the user's physical location (for example, if the client uses VPN). For optimal results, you should include this header and the X-MSEdge-ClientIP header, but at a minimum, you should include this header. countryCode - a 2-character country code of the country where the results come from. This API supports only the United States market. If you specify this query parameter, it must be set to us. If you set this parameter, you must also specify the Accept-Language header. Bing uses the first supported language it finds from the languages list, and combine that language with the country code that you specify to determine the market to return results for. If the languages list does not include a supported language, Bing finds the closest language and market that supports the request, or it may use an aggregated or default market for the results instead of a specified one. You should use this query parameter and the Accept-Language query parameter only if you specify multiple languages; otherwise, you should use the mkt and setLang query parameters. This parameter and the mkt query parameter are mutually exclusive—do not specify both. count - the number of search results to return in the response. The default is 10 and the maximum value is 50. The actual number delivered may be less than requested.Use this parameter along with the offset parameter to page results.For example, if your user interface displays 10 search results per page, set count to 10 and offset to 0 to get the first page of results. For each subsequent page, increment offset by 10 (for example, 0, 10, 20). It is possible for multiple pages to include some overlap in results. market - the market where the results come from. Typically, mkt is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results. The market must be in the form <language code>-<country code>. For example, en-US. The string is case insensitive. If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market Codes, Bing uses a best fit market code based on an internal mapping that is subject to change. This parameter and the cc query parameter are mutually exclusive—do not specify both. offset - the zero-based offset that indicates the number of search results to skip before returning results. The default is 0. The offset should be less than (totalEstimatedMatches - count). Use this parameter along with the count parameter to page results. For example, if your user interface displays 10 search results per page, set count to 10 and offset to 0 to get the first page of results. For each subsequent page, increment offset by 10 (for example, 0, 10, 20). it is possible for multiple pages to include some overlap in results. safeSearch - a filter used to filter adult content. Off: Return webpages with adult text, images, or videos. Moderate: Return webpages with adult text, but not adult images or videos. Strict: Do not return webpages with adult text, images, or videos. The default is Moderate. If the request comes from a market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses Strict. If you use the site: query operator, there is the chance that the response may contain adult content regardless of what the safeSearch query parameter is set to. Use site: only if you are aware of the content on the site and your scenario supports the possibility of adult content. setLang - the language to use for user interface strings. Specify the language using the ISO 639-1 2-letter language code. For example, the language code for English is EN. The default is EN (English). Although optional, you should always specify the language. Typically, you set setLang to the same language specified by mkt unless the user wants the user interface strings displayed in a different language. This parameter and the Accept-Language header are mutually exclusive; do not specify both. A user interface string is a string that's used as a label in a user interface. There are few user interface strings in the JSON response objects. Also, any links to Bing.com properties in the response objects apply the specified language. textDecorations - a Boolean value that determines whether display strings should contain decoration markers such as hit highlighting characters. If true, the strings may include markers. The default is false. To specify whether to use Unicode characters or HTML tags as the markers, see the textFormat query parameter. textFormat - the type of markers to use for text decorations (see the textDecorations query parameter). Possible values are Raw—Use Unicode characters to mark content that needs special formatting. The Unicode characters are in the range E000 through E019. For example, Bing uses E000 and E001 to mark the beginning and end of query terms for hit highlighting. HTML—Use HTML tags to mark content that needs special formatting. For example, use <b> tags to highlight query terms in display strings. The default is Raw. For display strings that contain escapable HTML characters such as <, >, and &, if textFormat is set to HTML, Bing escapes the characters as appropriate (for example, < is escaped to &lt;).

func (CustomInstanceClient) SearchPreparer

func (client CustomInstanceClient) SearchPreparer(ctx context.Context, customConfig string, query string, acceptLanguage string, userAgent string, clientID string, clientIP string, location string, countryCode string, count *int32, market string, offset *int32, safeSearch SafeSearch, setLang string, textDecorations *bool, textFormat TextFormat) (*http.Request, error)

SearchPreparer prepares the Search request.

func (CustomInstanceClient) SearchResponder

func (client CustomInstanceClient) SearchResponder(resp *http.Response) (result SearchResponse, err error)

SearchResponder handles the response to the Search request. The method always closes the http.Response Body.

func (CustomInstanceClient) SearchSender

func (client CustomInstanceClient) SearchSender(req *http.Request) (*http.Response, error)

SearchSender sends the Search request. The method will close the http.Response Body if it receives an error.

type Error

type Error struct {
	// Code - The error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'
	Code ErrorCode `json:"code,omitempty"`
	// SubCode - READ-ONLY; The error code that further helps to identify the error. Possible values include: 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', 'HTTPNotAllowed', 'Blocked', 'AuthorizationMissing', 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired'
	SubCode ErrorSubCode `json:"subCode,omitempty"`
	// Message - A description of the error.
	Message *string `json:"message,omitempty"`
	// MoreDetails - READ-ONLY; A description that provides additional information about the error.
	MoreDetails *string `json:"moreDetails,omitempty"`
	// Parameter - READ-ONLY; The parameter in the request that caused the error.
	Parameter *string `json:"parameter,omitempty"`
	// Value - READ-ONLY; The parameter's value in the request that was not valid.
	Value *string `json:"value,omitempty"`
}

Error defines the error that occurred.

func (Error) MarshalJSON

func (e Error) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Error.

type ErrorCode

type ErrorCode string

ErrorCode enumerates the values for error code.

const (
	// InsufficientAuthorization ...
	InsufficientAuthorization ErrorCode = "InsufficientAuthorization"
	// InvalidAuthorization ...
	InvalidAuthorization ErrorCode = "InvalidAuthorization"
	// InvalidRequest ...
	InvalidRequest ErrorCode = "InvalidRequest"
	// None ...
	None ErrorCode = "None"
	// RateLimitExceeded ...
	RateLimitExceeded ErrorCode = "RateLimitExceeded"
	// ServerError ...
	ServerError ErrorCode = "ServerError"
)

func PossibleErrorCodeValues

func PossibleErrorCodeValues() []ErrorCode

PossibleErrorCodeValues returns an array of possible values for the ErrorCode const type.

type ErrorResponse

type ErrorResponse struct {
	// Errors - A list of errors that describe the reasons why the request failed.
	Errors *[]Error `json:"errors,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

ErrorResponse the top-level response that represents a failed request.

func (ErrorResponse) AsAnswer

func (er ErrorResponse) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicAnswer

func (er ErrorResponse) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicCreativeWork

func (er ErrorResponse) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicIdentifiable

func (er ErrorResponse) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicResponse

func (er ErrorResponse) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicResponseBase

func (er ErrorResponse) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicSearchResultsAnswer

func (er ErrorResponse) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsBasicThing

func (er ErrorResponse) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsCreativeWork

func (er ErrorResponse) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsErrorResponse

func (er ErrorResponse) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsIdentifiable

func (er ErrorResponse) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsResponse

func (er ErrorResponse) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsResponseBase

func (er ErrorResponse) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsSearchResponse

func (er ErrorResponse) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsSearchResultsAnswer

func (er ErrorResponse) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsThing

func (er ErrorResponse) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsWebPage

func (er ErrorResponse) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) AsWebWebAnswer

func (er ErrorResponse) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for ErrorResponse.

func (ErrorResponse) MarshalJSON

func (er ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorResponse.

type ErrorSubCode

type ErrorSubCode string

ErrorSubCode enumerates the values for error sub code.

const (
	// AuthorizationDisabled ...
	AuthorizationDisabled ErrorSubCode = "AuthorizationDisabled"
	// AuthorizationExpired ...
	AuthorizationExpired ErrorSubCode = "AuthorizationExpired"
	// AuthorizationMissing ...
	AuthorizationMissing ErrorSubCode = "AuthorizationMissing"
	// AuthorizationRedundancy ...
	AuthorizationRedundancy ErrorSubCode = "AuthorizationRedundancy"
	// Blocked ...
	Blocked ErrorSubCode = "Blocked"
	// HTTPNotAllowed ...
	HTTPNotAllowed ErrorSubCode = "HttpNotAllowed"
	// NotImplemented ...
	NotImplemented ErrorSubCode = "NotImplemented"
	// ParameterInvalidValue ...
	ParameterInvalidValue ErrorSubCode = "ParameterInvalidValue"
	// ParameterMissing ...
	ParameterMissing ErrorSubCode = "ParameterMissing"
	// ResourceError ...
	ResourceError ErrorSubCode = "ResourceError"
	// UnexpectedError ...
	UnexpectedError ErrorSubCode = "UnexpectedError"
)

func PossibleErrorSubCodeValues

func PossibleErrorSubCodeValues() []ErrorSubCode

PossibleErrorSubCodeValues returns an array of possible values for the ErrorSubCode const type.

type Identifiable

type Identifiable struct {
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

Identifiable defines the identity of a resource.

func (Identifiable) AsAnswer

func (i Identifiable) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicAnswer

func (i Identifiable) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicCreativeWork

func (i Identifiable) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicIdentifiable

func (i Identifiable) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicResponse

func (i Identifiable) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicResponseBase

func (i Identifiable) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicSearchResultsAnswer

func (i Identifiable) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsBasicThing

func (i Identifiable) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsCreativeWork

func (i Identifiable) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsErrorResponse

func (i Identifiable) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsIdentifiable

func (i Identifiable) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsResponse

func (i Identifiable) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsResponseBase

func (i Identifiable) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsSearchResponse

func (i Identifiable) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsSearchResultsAnswer

func (i Identifiable) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsThing

func (i Identifiable) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsWebPage

func (i Identifiable) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for Identifiable.

func (Identifiable) AsWebWebAnswer

func (i Identifiable) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for Identifiable.

func (Identifiable) MarshalJSON

func (i Identifiable) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Identifiable.

type Query

type Query struct {
	// Text - The query string. Use this string as the query term in a new search request.
	Text *string `json:"text,omitempty"`
	// DisplayText - READ-ONLY; The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting
	DisplayText *string `json:"displayText,omitempty"`
	// WebSearchURL - READ-ONLY; The URL that takes the user to the Bing search results page for the query.Only related search results include this field.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// SearchLink - READ-ONLY
	SearchLink *string `json:"searchLink,omitempty"`
}

Query defines a search query.

func (Query) MarshalJSON

func (q Query) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Query.

type QueryContext

type QueryContext struct {
	// OriginalQuery - The query string as specified in the request.
	OriginalQuery *string `json:"originalQuery,omitempty"`
	// AlteredQuery - READ-ONLY; The query string used by Bing to perform the query. Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is "saling downwind", the altered query string will be "sailing downwind". This field is included only if the original query string contains a spelling mistake.
	AlteredQuery *string `json:"alteredQuery,omitempty"`
	// AlterationOverrideQuery - READ-ONLY; The query string to use to force Bing to use the original string. For example, if the query string is "saling downwind", the override query string will be "+saling downwind". Remember to encode the query string which results in "%2Bsaling+downwind". This field is included only if the original query string contains a spelling mistake.
	AlterationOverrideQuery *string `json:"alterationOverrideQuery,omitempty"`
	// AdultIntent - READ-ONLY; A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false.
	AdultIntent *bool `json:"adultIntent,omitempty"`
}

QueryContext defines the query context that Bing used for the request.

func (QueryContext) MarshalJSON

func (qc QueryContext) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for QueryContext.

type Response

type Response struct {
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

Response defines a response. All schemas that could be returned at the root of a response should inherit from this

func (Response) AsAnswer

func (r Response) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for Response.

func (Response) AsBasicAnswer

func (r Response) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for Response.

func (Response) AsBasicCreativeWork

func (r Response) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for Response.

func (Response) AsBasicIdentifiable

func (r Response) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for Response.

func (Response) AsBasicResponse

func (r Response) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for Response.

func (Response) AsBasicResponseBase

func (r Response) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for Response.

func (Response) AsBasicSearchResultsAnswer

func (r Response) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Response.

func (Response) AsBasicThing

func (r Response) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for Response.

func (Response) AsCreativeWork

func (r Response) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for Response.

func (Response) AsErrorResponse

func (r Response) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for Response.

func (Response) AsIdentifiable

func (r Response) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for Response.

func (Response) AsResponse

func (r Response) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for Response.

func (Response) AsResponseBase

func (r Response) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for Response.

func (Response) AsSearchResponse

func (r Response) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for Response.

func (Response) AsSearchResultsAnswer

func (r Response) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for Response.

func (Response) AsThing

func (r Response) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for Response.

func (Response) AsWebPage

func (r Response) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for Response.

func (Response) AsWebWebAnswer

func (r Response) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for Response.

func (Response) MarshalJSON

func (r Response) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Response.

type ResponseBase

type ResponseBase struct {
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

ResponseBase ...

func (ResponseBase) AsAnswer

func (rb ResponseBase) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicAnswer

func (rb ResponseBase) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicCreativeWork

func (rb ResponseBase) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicIdentifiable

func (rb ResponseBase) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicResponse

func (rb ResponseBase) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicResponseBase

func (rb ResponseBase) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicSearchResultsAnswer

func (rb ResponseBase) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsBasicThing

func (rb ResponseBase) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsCreativeWork

func (rb ResponseBase) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsErrorResponse

func (rb ResponseBase) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsIdentifiable

func (rb ResponseBase) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsResponse

func (rb ResponseBase) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsResponseBase

func (rb ResponseBase) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsSearchResponse

func (rb ResponseBase) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsSearchResultsAnswer

func (rb ResponseBase) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsThing

func (rb ResponseBase) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsWebPage

func (rb ResponseBase) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) AsWebWebAnswer

func (rb ResponseBase) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for ResponseBase.

func (ResponseBase) MarshalJSON

func (rb ResponseBase) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ResponseBase.

type SafeSearch

type SafeSearch string

SafeSearch enumerates the values for safe search.

const (
	// Moderate ...
	Moderate SafeSearch = "Moderate"
	// Off ...
	Off SafeSearch = "Off"
	// Strict ...
	Strict SafeSearch = "Strict"
)

func PossibleSafeSearchValues

func PossibleSafeSearchValues() []SafeSearch

PossibleSafeSearchValues returns an array of possible values for the SafeSearch const type.

type SearchResponse

type SearchResponse struct {
	autorest.Response `json:"-"`
	// QueryContext - READ-ONLY; An object that contains the query string that Bing used for the request. This object contains the query string as entered by the user. It may also contain an altered query string that Bing used for the query if the query string contained a spelling mistake.
	QueryContext *QueryContext `json:"queryContext,omitempty"`
	// WebPages - READ-ONLY; A list of webpages that are relevant to the search query.
	WebPages *WebWebAnswer `json:"webPages,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

SearchResponse defines the top-level object that the response includes when the request succeeds.

func (SearchResponse) AsAnswer

func (sr SearchResponse) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicAnswer

func (sr SearchResponse) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicCreativeWork

func (sr SearchResponse) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicIdentifiable

func (sr SearchResponse) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicResponse

func (sr SearchResponse) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicResponseBase

func (sr SearchResponse) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicSearchResultsAnswer

func (sr SearchResponse) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsBasicThing

func (sr SearchResponse) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsCreativeWork

func (sr SearchResponse) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsErrorResponse

func (sr SearchResponse) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsIdentifiable

func (sr SearchResponse) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsResponse

func (sr SearchResponse) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsResponseBase

func (sr SearchResponse) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsSearchResponse

func (sr SearchResponse) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsSearchResultsAnswer

func (sr SearchResponse) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsThing

func (sr SearchResponse) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsWebPage

func (sr SearchResponse) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) AsWebWebAnswer

func (sr SearchResponse) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for SearchResponse.

func (SearchResponse) MarshalJSON

func (sr SearchResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SearchResponse.

type SearchResultsAnswer

type SearchResultsAnswer struct {
	// QueryContext - READ-ONLY
	QueryContext *QueryContext `json:"queryContext,omitempty"`
	// TotalEstimatedMatches - READ-ONLY; The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.
	TotalEstimatedMatches *int64 `json:"totalEstimatedMatches,omitempty"`
	// IsFamilyFriendly - READ-ONLY
	IsFamilyFriendly *bool `json:"isFamilyFriendly,omitempty"`
	// FollowUpQueries - READ-ONLY
	FollowUpQueries *[]Query `json:"followUpQueries,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

SearchResultsAnswer ...

func (SearchResultsAnswer) AsAnswer

func (sra SearchResultsAnswer) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicAnswer

func (sra SearchResultsAnswer) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicCreativeWork

func (sra SearchResultsAnswer) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicIdentifiable

func (sra SearchResultsAnswer) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicResponse

func (sra SearchResultsAnswer) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicResponseBase

func (sra SearchResultsAnswer) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicSearchResultsAnswer

func (sra SearchResultsAnswer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsBasicThing

func (sra SearchResultsAnswer) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsCreativeWork

func (sra SearchResultsAnswer) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsErrorResponse

func (sra SearchResultsAnswer) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsIdentifiable

func (sra SearchResultsAnswer) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsResponse

func (sra SearchResultsAnswer) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsResponseBase

func (sra SearchResultsAnswer) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsSearchResponse

func (sra SearchResultsAnswer) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsSearchResultsAnswer

func (sra SearchResultsAnswer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsThing

func (sra SearchResultsAnswer) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsWebPage

func (sra SearchResultsAnswer) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) AsWebWebAnswer

func (sra SearchResultsAnswer) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for SearchResultsAnswer.

func (SearchResultsAnswer) MarshalJSON

func (sra SearchResultsAnswer) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SearchResultsAnswer.

type TextFormat

type TextFormat string

TextFormat enumerates the values for text format.

const (
	// HTML ...
	HTML TextFormat = "Html"
	// Raw ...
	Raw TextFormat = "Raw"
)

func PossibleTextFormatValues

func PossibleTextFormatValues() []TextFormat

PossibleTextFormatValues returns an array of possible values for the TextFormat const type.

type Thing

type Thing struct {
	// Name - READ-ONLY; The name of the thing represented by this object.
	Name *string `json:"name,omitempty"`
	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
	URL *string `json:"url,omitempty"`
	// Description - READ-ONLY; A short description of the item.
	Description *string `json:"description,omitempty"`
	// BingID - READ-ONLY; An ID that uniquely identifies this item.
	BingID *string `json:"bingId,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

Thing ...

func (Thing) AsAnswer

func (t Thing) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicAnswer

func (t Thing) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicCreativeWork

func (t Thing) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicIdentifiable

func (t Thing) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicResponse

func (t Thing) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicResponseBase

func (t Thing) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicSearchResultsAnswer

func (t Thing) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Thing.

func (Thing) AsBasicThing

func (t Thing) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for Thing.

func (Thing) AsCreativeWork

func (t Thing) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for Thing.

func (Thing) AsErrorResponse

func (t Thing) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for Thing.

func (Thing) AsIdentifiable

func (t Thing) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for Thing.

func (Thing) AsResponse

func (t Thing) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for Thing.

func (Thing) AsResponseBase

func (t Thing) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for Thing.

func (Thing) AsSearchResponse

func (t Thing) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for Thing.

func (Thing) AsSearchResultsAnswer

func (t Thing) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for Thing.

func (Thing) AsThing

func (t Thing) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for Thing.

func (Thing) AsWebPage

func (t Thing) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for Thing.

func (Thing) AsWebWebAnswer

func (t Thing) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for Thing.

func (Thing) MarshalJSON

func (t Thing) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Thing.

type Type

type Type string

Type enumerates the values for type.

const (
	// TypeAnswer ...
	TypeAnswer Type = "Answer"
	// TypeCreativeWork ...
	TypeCreativeWork Type = "CreativeWork"
	// TypeErrorResponse ...
	TypeErrorResponse Type = "ErrorResponse"
	// TypeIdentifiable ...
	TypeIdentifiable Type = "Identifiable"
	// TypeResponse ...
	TypeResponse Type = "Response"
	// TypeResponseBase ...
	TypeResponseBase Type = "ResponseBase"
	// TypeSearchResponse ...
	TypeSearchResponse Type = "SearchResponse"
	// TypeSearchResultsAnswer ...
	TypeSearchResultsAnswer Type = "SearchResultsAnswer"
	// TypeThing ...
	TypeThing Type = "Thing"
	// TypeWebPage ...
	TypeWebPage Type = "WebPage"
	// TypeWebWebAnswer ...
	TypeWebWebAnswer Type = "Web/WebAnswer"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns an array of possible values for the Type const type.

type WebMetaTag

type WebMetaTag struct {
	// Name - READ-ONLY; The metadata.
	Name *string `json:"name,omitempty"`
	// Content - READ-ONLY; The name of the metadata.
	Content *string `json:"content,omitempty"`
}

WebMetaTag defines a webpage's metadata.

type WebPage

type WebPage struct {
	// DisplayURL - READ-ONLY; The display URL of the webpage. The URL is meant for display purposes only and is not well formed.
	DisplayURL *string `json:"displayUrl,omitempty"`
	// Snippet - READ-ONLY; A snippet of text from the webpage that describes its contents.
	Snippet *string `json:"snippet,omitempty"`
	// DeepLinks - READ-ONLY; A list of links to related content that Bing found in the website that contains this webpage. The Webpage object in this context includes only the name, url, urlPingSuffix, and snippet fields.
	DeepLinks *[]WebPage `json:"deepLinks,omitempty"`
	// DateLastCrawled - READ-ONLY; The last time that Bing crawled the webpage. The date is in the form, YYYY-MM-DDTHH:MM:SS. For example, 2015-04-13T05:23:39.
	DateLastCrawled *string `json:"dateLastCrawled,omitempty"`
	// SearchTags - READ-ONLY; A list of search tags that the webpage owner specified on the webpage. The API returns only indexed search tags. The name field of the MetaTag object contains the indexed search tag. Search tags begin with search.* (for example, search.assetId). The content field contains the tag's value.
	SearchTags *[]WebMetaTag `json:"searchTags,omitempty"`
	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
	// Provider - READ-ONLY; The source of the creative work.
	Provider *[]BasicThing `json:"provider,omitempty"`
	// Text - READ-ONLY
	Text *string `json:"text,omitempty"`
	// Name - READ-ONLY; The name of the thing represented by this object.
	Name *string `json:"name,omitempty"`
	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
	URL *string `json:"url,omitempty"`
	// Description - READ-ONLY; A short description of the item.
	Description *string `json:"description,omitempty"`
	// BingID - READ-ONLY; An ID that uniquely identifies this item.
	BingID *string `json:"bingId,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

WebPage defines a webpage that is relevant to the query.

func (WebPage) AsAnswer

func (wp WebPage) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicAnswer

func (wp WebPage) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicCreativeWork

func (wp WebPage) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicIdentifiable

func (wp WebPage) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicResponse

func (wp WebPage) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicResponseBase

func (wp WebPage) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicSearchResultsAnswer

func (wp WebPage) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for WebPage.

func (WebPage) AsBasicThing

func (wp WebPage) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for WebPage.

func (WebPage) AsCreativeWork

func (wp WebPage) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for WebPage.

func (WebPage) AsErrorResponse

func (wp WebPage) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for WebPage.

func (WebPage) AsIdentifiable

func (wp WebPage) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for WebPage.

func (WebPage) AsResponse

func (wp WebPage) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for WebPage.

func (WebPage) AsResponseBase

func (wp WebPage) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for WebPage.

func (WebPage) AsSearchResponse

func (wp WebPage) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for WebPage.

func (WebPage) AsSearchResultsAnswer

func (wp WebPage) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for WebPage.

func (WebPage) AsThing

func (wp WebPage) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for WebPage.

func (WebPage) AsWebPage

func (wp WebPage) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for WebPage.

func (WebPage) AsWebWebAnswer

func (wp WebPage) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for WebPage.

func (WebPage) MarshalJSON

func (wp WebPage) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for WebPage.

func (*WebPage) UnmarshalJSON

func (wp *WebPage) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for WebPage struct.

type WebWebAnswer

type WebWebAnswer struct {
	// Value - A list of webpages that are relevant to the query.
	Value *[]WebPage `json:"value,omitempty"`
	// SomeResultsRemoved - READ-ONLY; A Boolean value that indicates whether the response excluded some results from the answer. If Bing excluded some results, the value is true.
	SomeResultsRemoved *bool `json:"someResultsRemoved,omitempty"`
	// QueryContext - READ-ONLY
	QueryContext *QueryContext `json:"queryContext,omitempty"`
	// TotalEstimatedMatches - READ-ONLY; The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.
	TotalEstimatedMatches *int64 `json:"totalEstimatedMatches,omitempty"`
	// IsFamilyFriendly - READ-ONLY
	IsFamilyFriendly *bool `json:"isFamilyFriendly,omitempty"`
	// FollowUpQueries - READ-ONLY
	FollowUpQueries *[]Query `json:"followUpQueries,omitempty"`
	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
	WebSearchURL *string `json:"webSearchUrl,omitempty"`
	// ID - READ-ONLY; A String identifier.
	ID *string `json:"id,omitempty"`
	// Type - Possible values include: 'TypeResponseBase', 'TypeWebPage', 'TypeWebWebAnswer', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeAnswer', 'TypeThing', 'TypeCreativeWork'
	Type Type `json:"_type,omitempty"`
}

WebWebAnswer defines a list of relevant webpage links.

func (WebWebAnswer) AsAnswer

func (wwa WebWebAnswer) AsAnswer() (*Answer, bool)

AsAnswer is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicAnswer

func (wwa WebWebAnswer) AsBasicAnswer() (BasicAnswer, bool)

AsBasicAnswer is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicCreativeWork

func (wwa WebWebAnswer) AsBasicCreativeWork() (BasicCreativeWork, bool)

AsBasicCreativeWork is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicIdentifiable

func (wwa WebWebAnswer) AsBasicIdentifiable() (BasicIdentifiable, bool)

AsBasicIdentifiable is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicResponse

func (wwa WebWebAnswer) AsBasicResponse() (BasicResponse, bool)

AsBasicResponse is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicResponseBase

func (wwa WebWebAnswer) AsBasicResponseBase() (BasicResponseBase, bool)

AsBasicResponseBase is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicSearchResultsAnswer

func (wwa WebWebAnswer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)

AsBasicSearchResultsAnswer is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsBasicThing

func (wwa WebWebAnswer) AsBasicThing() (BasicThing, bool)

AsBasicThing is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsCreativeWork

func (wwa WebWebAnswer) AsCreativeWork() (*CreativeWork, bool)

AsCreativeWork is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsErrorResponse

func (wwa WebWebAnswer) AsErrorResponse() (*ErrorResponse, bool)

AsErrorResponse is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsIdentifiable

func (wwa WebWebAnswer) AsIdentifiable() (*Identifiable, bool)

AsIdentifiable is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsResponse

func (wwa WebWebAnswer) AsResponse() (*Response, bool)

AsResponse is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsResponseBase

func (wwa WebWebAnswer) AsResponseBase() (*ResponseBase, bool)

AsResponseBase is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsSearchResponse

func (wwa WebWebAnswer) AsSearchResponse() (*SearchResponse, bool)

AsSearchResponse is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsSearchResultsAnswer

func (wwa WebWebAnswer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool)

AsSearchResultsAnswer is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsThing

func (wwa WebWebAnswer) AsThing() (*Thing, bool)

AsThing is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsWebPage

func (wwa WebWebAnswer) AsWebPage() (*WebPage, bool)

AsWebPage is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) AsWebWebAnswer

func (wwa WebWebAnswer) AsWebWebAnswer() (*WebWebAnswer, bool)

AsWebWebAnswer is the BasicResponseBase implementation for WebWebAnswer.

func (WebWebAnswer) MarshalJSON

func (wwa WebWebAnswer) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for WebWebAnswer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL