mikedemers / rbing Goto Github PK
View Code? Open in Web Editor NEWa Ruby library for Microsoft's Bing search API
Home Page: http://9astronauts.com/code/ruby/rbing
License: MIT License
a Ruby library for Microsoft's Bing search API
Home Page: http://9astronauts.com/code/ruby/rbing
License: MIT License
Dear Sir:
I use your rbing api, and I want to know how do I specify the return result's language. I check the code, and try add "language:en" but it seems not work. I want to know if there is any way to specify the return result's language. Many
thanks.
Yours sincerely
This isn't so much a bug as a problem that I couldn't solve by myself and was hoping you'd be able to help with:
It seems that, contrary to the docs, the Bing API does not automatically alter a query when it is misspelled. This means that RBing::web("Dha Dkan", :site => 'imdb.com/title') returns no results while the equivalent query on the Bing site (http://www.bing.com/search?q=dha+dkan+site%3Aimdb.com%2Ftitle&qs=HS&form=QBLH&pq=dha+dkan&sc=8-8&sp=1&sk=) returns the correct result at the first position.
My question is now how I can get RBing to return the results to the altered query where appropriate. Can I somehow set the AlteredQuery property (http://msdn.microsoft.com/en-us/library/dd250932.aspx) or is there some other way of accomplishing this?
EDIT: Never mind, turns out httparty needed to be updated
Seeing this upon first launch of RBing
/httparty/parser.rb:116:in `json': [DEPRECATION] MultiJson.decode is deprecated and will be removed in the next major version. Use MultiJson.load instead.
steps to reproduce error
gem install rbing
require 'rubygems' require 'rbing' bing = RBing.new("APPID")
doing so give me following error
from /Users/bhushan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`gem_original_require'
from /Users/bhushan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from rbing.rb:2
From their migration doc, here are the changes that need to happen.
Good day! How to add EnableHighlighting options? I tried
rsp = bing.web("Ruby", :Market => "en-Us",:Options => ["EnableHighlighting"] , :offset => 1, :count => 1)
but it doesn't work
I am getting an error "Errors"=>[{"Code"=>1002, "Message"=>"Parameter has invalid value.", "Parameter"=>"SearchRequest.AppId", "Value"=>"--------------------------", "HelpUrl"=>"http://msdn.microsoft.com/en-us/library/dd251042.aspx"}] ", key blanked out. Any ideas?
My code is just like the example given.
require 'rubygems'
require 'rbing'
bing = RBing.new('aaaaaaaaaaaaaaaaaaaaaaaaaaa')
rsp = bing.web("tommy lee jones")
p rsp
... since github stopped building gems. Any plans to put it up on gemcutter.org?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.