module BingSearch

Constants

HIGHLIGHT_DELIMITER
VERSION

Attributes

account_key[RW]

An Account Key obtained from the Azure Marketplace. You can set this attribute once instead of instantiating each {Client} with an Account Key. @return [String]

web_only[RW]

Whether to use the less expensive web-only API @return [Boolean]

Public Class Methods

composite(*args) click to toggle source

Convenience method that creates a {Client} and searches multiple sources. Takes the same arguments as {Client#related_search}. Set {account_key} before calling. @return (see Client#composite) @see Client#composite

# File lib/bing-search.rb, line 90
def composite(*args)
  Client.new.composite(*args)
end
image(*args) click to toggle source

Convenience method that creates a {Client} and searches for images. Takes the same arguments as {Client#image}. Set {account_key} before calling. @return (see Client#image) @see Client#image

# File lib/bing-search.rb, line 40
def image(*args)
  Client.new.image(*args)
end
news(*args) click to toggle source

Convenience method that creates a {Client} and searches for news. Takes the same arguments as {Client#news}. Set {account_key} before calling. @return (see Client#news) @see Client#news

# File lib/bing-search.rb, line 58
def news(*args)
  Client.new.news(*args)
end
spelling(*args)
spelling_suggestions(*args) click to toggle source

Convenience method that creates a {Client} and corrects spelling in the query text. Takes the same arguments as {Client#related_search}. Set {account_key} before calling. @return (see Client#spelling_suggestions) @see Client#spelling_suggestions

# File lib/bing-search.rb, line 79
def spelling_suggestions(*args)
  Client.new.spelling_suggestions(*args)
end
Also aliased as: spelling
video(*args) click to toggle source

Convenience method that creates a {Client} and searches for videos. Takes the same arguments as {Client#video}. Set {account_key} before calling. @return (see Client#video) @see Client#video

# File lib/bing-search.rb, line 49
def video(*args)
  Client.new.video(*args)
end
web(*args) click to toggle source

Convenience method that creates a {Client} and searches for web pages. Takes the same arguments as {Client#web}. Set {account_key} before calling. @return (see Client#web) @see Client#web

# File lib/bing-search.rb, line 31
def web(*args)
  Client.new.web(*args)
end