Documentation ¶
Index ¶
- Variables
- func SetEndpointAPI(apiEndpoint string)
- type AggregateRating
- type Category
- type Client
- type Computation
- type Entity
- type EntityAnswer
- type EntityPresentationInfo
- type Error
- type ErrorResponse
- type Identifiable
- type Image
- type Images
- type InsightsMetadata
- type Instrumentation
- type License
- type MediaSize
- type MetaTag
- type News
- type NewsArticle
- type Object
- type Offer
- type Organization
- type Pivot
- type Publisher
- type Query
- type QueryContext
- type RankingGroup
- type RankingItem
- type RankingResponse
- type RelatedSearchAnswer
- type RelatedTopic
- type SearchQuery
- type SearchResponse
- type SortValue
- type SpellSuggestions
- type Thing
- type Thumbnail
- type Tile
- type TimeZone
- type TimeZoneInformation
- type TrendingImages
- type Video
- type Videos
- type WebAnswer
- type WebPage
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func SetEndpointAPI ¶
func SetEndpointAPI(apiEndpoint string)
Types ¶
type AggregateRating ¶
type Client ¶
func (*Client) ImageSearch ¶
func (client *Client) ImageSearch(searchQuery *SearchQuery) (*Images, error)
type Computation ¶
type Entity ¶
type Entity struct { BingID string `json:"bingId"` ContractualRules []*Object `json:"contractualRules"` Description string `json:"description"` PresentationInfo *EntityPresentationInfo `json:"entityPresentationInfo"` Image *Image `json:"image"` Name string `json:"name"` WebSearchURL string `json:"webSearchUrl"` }
type EntityAnswer ¶
type EntityPresentationInfo ¶
type ErrorResponse ¶
type ErrorResponse struct { Type string `json:"_type"` Instrumentation *Instrumentation `json:"instrumentation"` Errors []*Error `json:"errors"` }
func (*ErrorResponse) Error ¶
func (errorResponse *ErrorResponse) Error() string
type Identifiable ¶
type Identifiable struct {
ID string `json:"id"`
}
type Image ¶
type Image struct { *MediaSize AccentColor string `json:"accentColor"` ContentSize string `json:"contentSize"` ContentURL string `json:"contentUrl"` DatePublished string `json:"datePublished"` EncodingFormat string `json:"encodingFormat"` HostPageDisplayURL string `json:"hostPageDisplayUrl"` HostPageURL string `json:"hostPageUrl"` ID string `json:"id"` ImageID string `json:"imageId"` ImageInsightsToken string `json:"imageInsightsToken"` InsightsMetadata *InsightsMetadata `json:"insightsMetadata"` Name string `json:"name"` Provider []*Organization `json:"provider"` Thumbnail *MediaSize `json:"thumbnail"` ThumbnailURL string `json:"thumbnailUrl"` WebSearchURL string `json:"webSearchUrl"` }
type Images ¶
type Images struct { Type string `json:"_type"` ID string `json:"id"` IsFamilyFriendly bool `json:"isFamilyFriendly"` NextOffset int `json:"nextOffset"` PivotSuggestions *Pivot `json:"pivotSuggestions"` QueryExpansions *Query `json:"queryExpansions"` ReadLink string `json:"readLink"` SimilarTerms *Query `json:"similarTerms"` TotalEstimatedMatches int `json:"totalEstimatedMatches"` Value []*Image `json:"value"` WebSearchURL string `json:"webSearchUrl"` }
type InsightsMetadata ¶
type Instrumentation ¶
type Instrumentation struct {
Type string `json:"type"`
}
type News ¶
type News struct { Type string `json:"type"` ID string `json:"id"` ReadLink string `json:"readLink"` RelatedTopics []*RelatedTopic `json:"relatedTopics"` Sort []*SortValue `json:"sort"` TotalEstimatedMatches int `json:"totalEstimatedMatches"` Value []*NewsArticle `json:"value"` }
type NewsArticle ¶
type NewsArticle struct { Category string `json:"category"` ClusteredArticles []*NewsArticle `json:"clusteredArticles"` ContractualRules []*Object `json:"contractualRules"` DatePublished string `json:"datePublished"` Description string `json:"description"` Headline bool `json:"headline"` ID string `json:"id"` Image *Image `json:"image"` Mentions []*Thing `json:"mentions"` Name string `json:"name"` Provider []*Organization `json:"provider"` URL string `json:"url"` Video *Video `json:"video"` }
type Offer ¶
type Offer struct { AggregateRating *AggregateRating `json:"aggregateRating"` Availability string `json:"availability"` Description string `json:"description"` LastUpdated string `json:"lastUpdated"` LowPrice float64 `json:"lowPrice"` Name string `json:"name"` OfferCount uint `json:"offerCount"` Price float64 `json:"price"` PriceCurrency string `json:"priceCurrency"` Seller *Organization `json:"seller"` URL string `json:"url"` }
type Organization ¶
type QueryContext ¶
type RankingGroup ¶
type RankingGroup struct {
Items []*RankingItem `json:"items"`
}
type RankingItem ¶
type RankingItem struct { AnswerType string `json:"answerType"` ResultIndex int `json:"resultIndex"` Value *Identifiable `json:"value"` }
type RankingResponse ¶
type RankingResponse struct { Mainline *RankingGroup `json:"mainline"` Pole *RankingGroup `json:"pole"` Sidebar *RankingGroup `json:"sidebar"` }
type RelatedSearchAnswer ¶
type RelatedTopic ¶
type RelatedTopic struct { RelatedNews *NewsArticle `json:"relatedNews"` Name string `json:"name"` WebSearchURL string `json:"webSearchUrl"` }
type SearchQuery ¶
type SearchResponse ¶
type SearchResponse struct { Type string `json:"_type"` Computation *Computation `json:"computation"` Entities *EntityAnswer `json:"entities"` Images *Images `json:"images"` News *News `json:"news"` QueryContext *QueryContext `json:"queryContext"` RankingResponse *RankingResponse `json:"rankingResponse"` RelatedSearches *RelatedSearchAnswer `json:"relatedSearches"` SpellSuggestions *SpellSuggestions `json:"spellSuggestions"` TimeZone *TimeZone `json:"timeZone"` Videos *Videos `json:"videos"` WebPages *WebAnswer `json:"webPages"` }
type SpellSuggestions ¶
type TimeZone ¶
type TimeZone struct { OtherCityTimes []*TimeZoneInformation `json:"otherCityTimes"` PrimaryCityTime *TimeZoneInformation `json:"primaryCityTime"` }
type TimeZoneInformation ¶
type TrendingImages ¶
type TrendingImages struct {
Categories []*Category `json:"categories"`
}
type Video ¶
type Video struct { AllowHTTPSEmbed bool `json:"allowHttpsEmbed"` AllowMobileEmbed bool `json:"allowMobileEmbed"` Creator *Publisher `json:"creator"` ContentURL string `json:"contentUrl"` DatePublished string `json:"datePublished"` Description string `json:"description"` Duration string `json:"duration"` EmbedHTML string `json:"embedHtml"` EncodingFormat string `json:"encodingFormat"` Height int `json:"height"` HostPageDisplayURL string `json:"hostPageDisplayUrl"` HostPageURL string `json:"hostPageUrl"` ID string `json:"id"` IsAccessibleForFree bool `json:"isAccessibleForFree"` IsSuperfresh bool `json:"isSuperfresh"` MainEntity *Thing `json:"mainEntity"` MotionThumbnailURL string `json:"motionThumbnailUrl"` Name string `json:"name"` Publisher *Publisher `json:"publisher"` Thumbnail *MediaSize `json:"thumbnail"` ThumbnailURL string `json:"thumbnailUrl"` VideoID string `json:"videoID"` ViewCount int `json:"viewCount"` WebSearchURL string `json:"webSearchUrl"` Width int `json:"width"` }
type Videos ¶
type Videos struct { Type string `json:"_type"` ID string `json:"id"` IsFamilyFriendly bool `json:"isFamilyFriendly"` NextOffset int `json:"nextOffset"` PivotSuggestions []*Pivot `json:"pivotSuggestions"` QueryExpansions []*Query `json:"queryExpansions"` Scenario string `json:"scenario"` TotalEstimatedMatches int `json:"totalEstimatedMatches"` Value []*Video `json:"value"` WebSearchURL string `json:"webSearchUrl"` }
type WebPage ¶
type WebPage struct { About *Object `json:"about"` DateLastCrawled string `json:"dateLastCrawled"` DeepLinks []*WebPage `json:"deepLinks"` DisplayURL string `json:"displayUrl"` ID string `json:"id"` Name string `json:"name"` Mentions *Object `json:"mentions"` SearchTags []*MetaTag `json:"searchTags"` Snippet string `json:"snippet"` URL string `json:"url"` }
Click to show internal directories.
Click to hide internal directories.