README.md in cognitivebing-0.1.0 vs README.md in cognitivebing-0.2.0
- old
+ new
@@ -1,11 +1,12 @@
# Cognitivebing
-Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cognitivebing`. To experiment with that code, run `bin/console` for an interactive prompt.
+A gem for the new Bing Web Search API from Microsoft cognitive services.
-TODO: Delete this and the text above, and describe your gem
+https://www.microsoft.com/cognitive-services/en-us/apis
+
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -20,10 +21,25 @@
$ gem install cognitivebing
## Usage
-TODO: Write usage instructions here
+require 'cognitivebing'
+
+bing = CognitiveBing.new(account_key)
+#web search
+result_set = bing.search(search_term)
+#Image search
+result_set = bing.search(search_term, 'image')
+#Video search
+result_set = bing.search(search_term, 'videos')
+#Suggestion search
+result_set = bing.suggestions(search_term)
+#News search
+bing = CognitiveBingNews.new(account_key)
+result_set = bing.search(search_term)
+#News trending
+result_set = bing.trending
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.