binged 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ module Binged
8
8
  include AnyPageable
9
9
 
10
10
  before(:each) do
11
- @client = Binged::Client.new(:api_key => 'binged')
11
+ @client = Binged::Client.new(:account_key => 'binged')
12
12
  @search = Image.new(@client)
13
13
  end
14
14
 
@@ -21,31 +21,45 @@ module Binged
21
21
  describe "size" do
22
22
  it "should filter by small images" do
23
23
  @search.small
24
- @search.query['Image.Filters'].should include('Size:Small')
24
+ @search.query['ImageFilters'].should include('Size:Small')
25
25
  end
26
26
 
27
27
  it "should filter by medium images" do
28
28
  @search.medium
29
- @search.query['Image.Filters'].should include('Size:Medium')
29
+ @search.query['ImageFilters'].should include('Size:Medium')
30
30
  end
31
31
 
32
32
  it "should filter by large images" do
33
33
  @search.large
34
- @search.query['Image.Filters'].should include('Size:Large')
34
+ @search.query['ImageFilters'].should include('Size:Large')
35
35
  end
36
36
 
37
37
  end
38
38
 
39
+ describe "adult" do
40
+ [:off, :moderate, :strict].each do |level|
41
+ it "should filter with adult content #{level}" do
42
+ @search.adult(level)
43
+ @search.query[:Adult].should == level
44
+ end
45
+
46
+ it "should filter with safe search #{level}" do
47
+ @search.safe_search(level)
48
+ @search.query[:Adult].should == level
49
+ end
50
+ end
51
+ end
52
+
39
53
  describe "size" do
40
54
 
41
55
  it "should filter for images with a specified height in pixels" do
42
56
  @search.height 100
43
- @search.query['Image.Filters'].should include('Size:Height:100')
57
+ @search.query['ImageFilters'].should include('Size:Height:100')
44
58
  end
45
59
 
46
60
  it "should filter for images with a specified width in pixels" do
47
61
  @search.width 150
48
- @search.query['Image.Filters'].should include('Size:Width:150')
62
+ @search.query['ImageFilters'].should include('Size:Width:150')
49
63
  end
50
64
 
51
65
  end
@@ -56,7 +70,7 @@ module Binged
56
70
 
57
71
  it "should restrict image results to those with #{aspect} aspect ratios" do
58
72
  @search.send aspect.downcase.to_sym
59
- @search.query['Image.Filters'].should include("Aspect:#{aspect}")
73
+ @search.query['ImageFilters'].should include("Aspect:#{aspect}")
60
74
  end
61
75
 
62
76
  end
@@ -69,7 +83,7 @@ module Binged
69
83
 
70
84
  it "should restrict image results to those which are in #{color}" do
71
85
  @search.send color.downcase.to_sym
72
- @search.query["Image.Filters"].should include("Color:#{color}")
86
+ @search.query["ImageFilters"].should include("Color:#{color}")
73
87
  end
74
88
 
75
89
  end
@@ -82,7 +96,7 @@ module Binged
82
96
 
83
97
  it "should restrict image results to those which have a #{style} style" do
84
98
  @search.send style.downcase.to_sym
85
- @search.query["Image.Filters"].should include("Style:#{style}")
99
+ @search.query["ImageFilters"].should include("Style:#{style}")
86
100
  end
87
101
 
88
102
  end
@@ -95,7 +109,7 @@ module Binged
95
109
 
96
110
  it "should restrict image results to those which contain a #{face}" do
97
111
  @search.send face.downcase.to_sym
98
- @search.query["Image.Filters"].should include("Face:#{face}")
112
+ @search.query["ImageFilters"].should include("Face:#{face}")
99
113
  end
100
114
 
101
115
  end
@@ -107,7 +121,7 @@ module Binged
107
121
  context "fetching" do
108
122
 
109
123
  before(:each) do
110
- stub_get("http://api.bing.net/json.aspx?AppId=binged&JsonType=raw&Image.Offset=0&Image.Count=20&Sources=image&Version=2.2&Query=ruby", 'images.json')
124
+ stub_get("https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Image?%24format=JSON&%24skip=0&%24top=20&Query=%27ruby%27", 'images.curl')
111
125
  @search.containing("ruby")
112
126
  @response = @search.fetch
113
127
  end
@@ -123,12 +137,12 @@ module Binged
123
137
 
124
138
  it "should support dot notation" do
125
139
  result = @response.results.first
126
- result.title.should == "ruby is said to give name ... "
127
- result.media_url.should == "http://www.shopping.astrolozy.com/images/gems/ruby.jpg"
128
- result.url.should == 'http://www.shopping.astrolozy.com/gems.asp'
129
- result.width.should == 506
130
- result.height.should == 500
131
- result.file_size.should == 23354
140
+ result.title.should == "Ruby | ANGEL JEWEL Custom Design Hand Made Jewellery, Mumbai"
141
+ result.media_url.should == "http://www.angeljewel.com/wp-content/uploads/2009/08/Ruby_by_Punksim1.jpg"
142
+ result.source_url.should == "http://angeljewel.com/index.php/materials/ruby"
143
+ result.width.should == "700"
144
+ result.height.should == "682"
145
+ result.file_size.should == "90134"
132
146
  result.content_type.should == 'image/jpeg'
133
147
  end
134
148
 
@@ -137,7 +151,7 @@ module Binged
137
151
  context "iterating over results" do
138
152
 
139
153
  before(:each) do
140
- stub_get("http://api.bing.net/json.aspx?AppId=binged&JsonType=raw&Image.Offset=0&Image.Count=20&Sources=image&Version=2.2&Query=ruby", 'images.json')
154
+ stub_get("https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Image?%24format=JSON&%24skip=0&%24top=20&Query=%27ruby%27", 'images.curl')
141
155
  @search.containing("ruby")
142
156
  end
143
157
 
@@ -8,7 +8,7 @@ module Binged
8
8
  include AnyPageable
9
9
 
10
10
  before(:each) do
11
- @client = Binged::Client.new(:api_key => 'binged')
11
+ @client = Binged::Client.new(:account_key => 'binged')
12
12
  @search = Video.new(@client)
13
13
  end
14
14
 
@@ -72,7 +72,7 @@ module Binged
72
72
 
73
73
  context "fetching" do
74
74
  before(:each) do
75
- stub_get "http://api.bing.net/json.aspx?AppId=binged&Sources=video&JsonType=raw&Video.Count=20&Version=2.2&Query=RailsConf&Video.Offset=0", "videos.json"
75
+ stub_get "https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Video?%24format=JSON&%24skip=0&%24top=20&Query=%27RailsConf%27", "videos.curl"
76
76
  @search.containing('RailsConf')
77
77
  @response = @search.fetch
78
78
  end
@@ -88,29 +88,29 @@ module Binged
88
88
 
89
89
  it "should support dot notation" do
90
90
  video = @response.results.first
91
- video.title.should == 'RailsConf Europe 08: Jeremy Kemper (37signals), Performance on Rails'
92
- video.play_url.should == 'http://railsconfeurope.blip.tv/file/1555719/'
93
- video.source_title.should == 'blip.tv'
94
- video.static_thumbnail.should_not be_nil
91
+ video.title.should == 'RailsConf 2010: Gary Vaynerchuk'
92
+ video.media_url.should == 'http://www.youtube.com/watch?v=-QWHkcCP3tA'
93
+ video.display_url.should == 'http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=56D112C9F90FD808059D56D112C9F90FD808059D&view=detail'
94
+ video.thumbnail.media_url.should == 'http://ts3.mm.bing.net/th?id=U.4982115564781686&pid=15.1'
95
95
  end
96
96
 
97
97
  end
98
98
 
99
99
  context "iterating over results" do
100
-
100
+
101
101
  before(:each) do
102
- stub_get "http://api.bing.net/json.aspx?AppId=binged&Sources=video&JsonType=raw&Video.Count=20&Version=2.2&Query=RailsConf&Video.Offset=0", "videos.json"
102
+ stub_get "https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Video?%24format=JSON&%24skip=0&%24top=20&Query=%27RailsConf%27", "videos.curl"
103
103
  @search.containing('RailsConf')
104
104
  end
105
-
105
+
106
106
  it "should be able to iterate through results" do
107
107
  @search.should respond_to(:each)
108
108
  end
109
-
109
+
110
110
  it "should have items" do
111
111
  @search.each {|result| result.should_not be_nil }
112
112
  end
113
-
113
+
114
114
  end
115
115
 
116
116
  end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'spec_helper'
2
3
 
3
4
  module Binged
@@ -8,7 +9,7 @@ module Binged
8
9
  include AnyPageable
9
10
 
10
11
  before(:each) do
11
- @client = Binged::Client.new(:api_key => 'binged')
12
+ @client = Binged::Client.new(:account_key => 'binged')
12
13
  @search = Web.new(@client)
13
14
  end
14
15
 
@@ -21,10 +22,24 @@ module Binged
21
22
  @search.query['Web.FileType'].should == :pdf
22
23
  end
23
24
 
25
+ context 'errors' do
26
+ before(:each) do
27
+ stub_get("https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Web?%24format=JSON&%24skip=0&%24top=20&Query=%27ruby%27",
28
+ 'bad_request.curl')
29
+ end
30
+
31
+ it 'raises' do
32
+ @search.containing('ruby')
33
+ expect {
34
+ @search.fetch
35
+ }.to raise_error(Binged::Search::Error, 'The authorization type you provided is not supported. Only Basic and OAuth are supported')
36
+ end
37
+ end
38
+
24
39
  context "fetching" do
25
40
 
26
41
  before(:each) do
27
- stub_get("http://api.bing.net/json.aspx?Web.Offset=0&Sources=web&AppId=binged&Query=ruby&JsonType=raw&Version=2.2&Web.Count=20", 'web.json')
42
+ stub_get("https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Web?%24format=JSON&%24skip=0&%24top=20&Query=%27ruby%27", 'web.curl')
28
43
  @search.containing("ruby")
29
44
  @response = @search.fetch
30
45
  end
@@ -41,8 +56,8 @@ module Binged
41
56
  it "should support dot notation" do
42
57
  result = @response.results.first
43
58
  result.title.should == "Ruby Programming Language"
44
- result.description.should == "Ruby is… A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is ..."
45
- result.url.should == "http://www.ruby-lang.org/en/"
59
+ result.description.should == "Participate in a friendly and growing community. Mailing Lists: Talk about Ruby with programmers from all around the world. User Groups: Get in contact with Rubyists ..."
60
+ result.url.should == "http://www.ruby-lang.org/"
46
61
  end
47
62
 
48
63
  end
@@ -50,7 +65,7 @@ module Binged
50
65
  context "iterating over results" do
51
66
 
52
67
  before(:each) do
53
- stub_get("http://api.bing.net/json.aspx?Web.Offset=0&Sources=Web&AppId=binged&Query=ruby&JsonType=raw&Version=2.2&Web.Count=20", 'web.json')
68
+ stub_get("https://binged:binged@api.datamarket.azure.com:443/Data.ashx/Bing/Search/Web?%24format=JSON&%24skip=0&%24top=20&Query=%27ruby%27", 'web.curl')
54
69
  @search.containing("ruby")
55
70
  end
56
71
 
data/spec/binged_spec.rb CHANGED
@@ -2,17 +2,17 @@ require 'spec_helper'
2
2
 
3
3
  describe "Binged" do
4
4
 
5
- it "should configure the api_key for easy access" do
5
+ it "should configure the account_key for easy access" do
6
6
  Binged.configure do |config|
7
- config.api_key = 'api_key'
7
+ config.account_key = 'account_key'
8
8
  end
9
9
 
10
10
  client = Binged::Client.new
11
- client.api_key.should == 'api_key'
11
+ client.account_key.should == 'account_key'
12
12
  end
13
13
 
14
14
  describe "Flexible interface" do
15
-
15
+
16
16
  before(:each) do
17
17
  @client = Binged::Client.new
18
18
  end
@@ -24,11 +24,11 @@ describe "Binged" do
24
24
  it "should provide an interface to image search" do
25
25
  @client.image.should be_instance_of(Binged::Search::Image)
26
26
  end
27
-
27
+
28
28
  it "should provide an interface to video search" do
29
29
  @client.video.should be_instance_of(Binged::Search::Video)
30
30
  end
31
-
31
+
32
32
  end
33
33
 
34
34
  end
@@ -0,0 +1,14 @@
1
+ HTTP/1.1 401 The authorization type you provided is not supported. Only Basic and OAuth are supported
2
+ Server: Microsoft-IIS/7.5
3
+ X-Content-Type-Options: nosniff
4
+ Access-Control-Allow-Origin: *
5
+ Access-Control-Allow-Credentials: false
6
+ Access-Control-Allow-Headers: Authorization
7
+ Access-Control-Allow-Methods: GET, POST, OPTIONS
8
+ Access-Control-Max-Age: 604800
9
+ WWW-Authenticate: Basic Realm=""
10
+ X-Powered-By: ASP.NET
11
+ Date: Tue, 06 Nov 2012 09:00:44 GMT
12
+ Content-Length: 91
13
+
14
+ The authorization type you provided is not supported. Only Basic and OAuth are supported
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 200 OK
2
+ Cache-Control: private
3
+ Content-Type: application/json; charset=utf-8
4
+ Server: Microsoft-IIS/7.5
5
+ X-Content-Type-Options: nosniff
6
+ Access-Control-Allow-Origin: *
7
+ Access-Control-Allow-Credentials: false
8
+ Access-Control-Allow-Headers: Authorization
9
+ Access-Control-Allow-Methods: GET, POST, OPTIONS
10
+ Access-Control-Max-Age: 604800
11
+ ActivityID: 9aa22e18-6408-4583-bf09-3ccb5b1904a9
12
+ X-AspNet-Version: 4.0.30319
13
+ X-Powered-By: ASP.NET
14
+ Date: Tue, 06 Nov 2012 07:36:46 GMT
15
+ Content-Length: 14928
16
+
17
+ {"d":{"results":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=0&$top=1","type":"ImageResult"},"ID":"f980e9b3-5039-44e5-a84e-bc5bc2535698","Title":"Ruby | ANGEL JEWEL Custom Design Hand Made Jewellery, Mumbai","MediaUrl":"http://www.angeljewel.com/wp-content/uploads/2009/08/Ruby_by_Punksim1.jpg","SourceUrl":"http://angeljewel.com/index.php/materials/ruby","DisplayUrl":"angeljewel.com/index.php/materials/ruby","Width":"700","Height":"682","FileSize":"90134","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4564129394000162&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"155","FileSize":"3498"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=1&$top=1","type":"ImageResult"},"ID":"ff58b4d2-0289-4b87-935b-495c7909320b","Title":"File:Ruby cristal.jpg - Wikipedia, the free encyclopedia","MediaUrl":"http://upload.wikimedia.org/wikipedia/commons/0/0d/Ruby_cristal.jpg","SourceUrl":"http://en.wikipedia.org/wiki/File:Ruby_cristal.jpg","DisplayUrl":"en.wikipedia.org/wiki/File:Ruby_cristal.jpg","Width":"700","Height":"975","FileSize":"80851","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=H.4527330121352241&pid=15.1","ContentType":"image/jpg","Width":"114","Height":"160","FileSize":"3094"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=2&$top=1","type":"ImageResult"},"ID":"bb729b6f-9d05-42a5-a3cb-d44f07c49412","Title":"File:Ruby-raw stones-Tanzania.jpg - Wikimedia Commons","MediaUrl":"http://upload.wikimedia.org/wikipedia/commons/6/61/Ruby-raw_stones-Tanzania.jpg","SourceUrl":"http://commons.wikimedia.org/wiki/File:Ruby-raw_stones-Tanzania.jpg","DisplayUrl":"commons.wikimedia.org/wiki/File:Ruby-raw_stones-Tanzania.jpg","Width":"1024","Height":"768","FileSize":"231800","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4515965625042386&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"3270"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=3&$top=1","type":"ImageResult"},"ID":"7871580e-213e-44bc-a77e-3955a1b502cd","Title":"Ruby: The Royal Gemstone","MediaUrl":"http://www.gemsoul.com/images/articles/madagascar-ruby.jpg","SourceUrl":"http://www.gemsoul.com/ruby-information","DisplayUrl":"www.gemsoul.com/ruby-information","Width":"882","Height":"758","FileSize":"67618","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4994953236776178&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"137","FileSize":"4516"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=4&$top=1","type":"ImageResult"},"ID":"650b1a9d-0c80-443d-9b3f-35d9ce0ce39b","Title":"Photo of Ruby number : 243","MediaUrl":"http://en.hibamusic.com/ajouter2/files_uploded/photos_artiste/full_size/ruby-268-243-4154297.jpg","SourceUrl":"http://en.hibamusic.com/Egypt/ruby/ruby-268.htm","DisplayUrl":"en.hibamusic.com/Egypt/ruby/ruby-268.htm","Width":"300","Height":"436","FileSize":"29487","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=H.4533948668773659&pid=15.1","ContentType":"image/jpg","Width":"110","Height":"160","FileSize":"3523"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=5&$top=1","type":"ImageResult"},"ID":"9c1088ca-42d7-4343-b176-9de78e96be85","Title":"The Carmen Lucia Ruby is a sight to behold","MediaUrl":"http://ui.thoughtbot.com/assets/2008-9-30-carmen_lucia_ruby.jpg","SourceUrl":"http://robots.thoughtbot.com/post/159806327/shoulda-2-0","DisplayUrl":"robots.thoughtbot.com/post/159806327/shoulda-2-0","Width":"1782","Height":"2500","FileSize":"206422","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4697629857874582&pid=15.1","ContentType":"image/jpg","Width":"114","Height":"160","FileSize":"3721"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=6&$top=1","type":"ImageResult"},"ID":"661ee46d-d812-403c-a641-49b1894b5a35","Title":"National Museum of Natural History: The Carmen Lúcia Ruby","MediaUrl":"http://mnh.si.edu/exhibits/images/ruby/carmen_lucia_ruby_side.jpg","SourceUrl":"http://mnh.si.edu/exhibits/ruby/index.htm","DisplayUrl":"mnh.si.edu/exhibits/ruby/index.htm","Width":"1715","Height":"2500","FileSize":"172117","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4538050351138802&pid=15.1","ContentType":"image/jpg","Width":"109","Height":"160","FileSize":"3315"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=7&$top=1","type":"ImageResult"},"ID":"f07c2849-ae9c-4e55-a04a-cbb2c099b0d1","Title":"The Ruby is deep red in color. It is a stone of passion and love and ...","MediaUrl":"http://angelreikihealing.com/wp-content/uploads/2011/03/ruby_Niassa_Mozambique_03-22-09_Page_01_Image_0001.jpg","SourceUrl":"http://angelreikihealing.com/?p=339","DisplayUrl":"angelreikihealing.com/?p=339","Width":"1320","Height":"877","FileSize":"202856","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=H.4913606547341927&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"106","FileSize":"2954"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=8&$top=1","type":"ImageResult"},"ID":"a0a397f2-1789-4059-903d-32e72eb0702c","Title":"Ruby Details","MediaUrl":"http://www.maharajajewel.com/Ruby_Ring_RUR004.jpg","SourceUrl":"http://www.maharajajewel.com/ruby_detail.htm","DisplayUrl":"www.maharajajewel.com/ruby_detail.htm","Width":"2522","Height":"1885","FileSize":"547316","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=H.4628648395475497&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"119","FileSize":"3242"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=9&$top=1","type":"ImageResult"},"ID":"4f5374a7-a1d3-46d4-afba-8bef1643f844","Title":"Box # 11 Round Ruby 3.35 ct","MediaUrl":"http://emanigems.com/wp-content/uploads/2011/09/Box-11-Round-Ruby-3.35-ct.jpg","SourceUrl":"http://emanigems.com/loose-stones/rubies/ruby-10011-2/","DisplayUrl":"emanigems.com/loose-stones/rubies/ruby-10011-2","Width":"1241","Height":"870","FileSize":"120892","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=H.4526488295638972&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"112","FileSize":"1939"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=10&$top=1","type":"ImageResult"},"ID":"774835a6-3563-4153-8abb-94b5dd172330","Title":"RUBY | Northeast Gemological","MediaUrl":"http://www.northeastgem.com/wp-content/uploads/2011/05/Ruby1.jpg","SourceUrl":"http://www.northeastgem.com/gem-identification/208/208/","DisplayUrl":"www.northeastgem.com/gem-identification/208/208","Width":"800","Height":"600","FileSize":"62050","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=H.4813362031625124&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"1805"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=11&$top=1","type":"ImageResult"},"ID":"ef150f41-7048-4dc1-a4fd-9c1c7d3da6d0","Title":"Ruby - Gemstones","MediaUrl":"http://astrologyandfortune.com/images-website/Gemstones/ruby.jpg","SourceUrl":"http://astrologyandfortune.com/ruby.asp","DisplayUrl":"astrologyandfortune.com/ruby.asp","Width":"300","Height":"300","FileSize":"22829","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=H.4917678164478005&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"160","FileSize":"3771"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=12&$top=1","type":"ImageResult"},"ID":"59ee2a3a-4d74-4f04-aab4-7583a765fddc","Title":"Home \u003e\u003e China female celebrity \u003e\u003e Ruby Lin","MediaUrl":"http://www.wallpaperfans.com/ab13/Celebrity-China-female-A-K/Ruby-Lin/th/Ruby-Lin-6797_800x480.jpg","SourceUrl":"http://www.wallpaperfans.com/Ruby-Lin/Ruby-Lin-6797.html","DisplayUrl":"www.wallpaperfans.com/Ruby-Lin/Ruby-Lin-6797.html","Width":"800","Height":"480","FileSize":"32819","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=H.4651480432182155&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"96","FileSize":"2562"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=13&$top=1","type":"ImageResult"},"ID":"3bbcf425-f47a-4bb0-abe2-6692d04c3323","Title":"Ruby Red Jewel | A Thorny Eternity Production","MediaUrl":"http://blog.thornyeternity.com/wp-content/uploads/2011/03/ruby-1000.jpg","SourceUrl":"http://blog.thornyeternity.com/todays-seamless-tile/ruby-red-jewel/","DisplayUrl":"blog.thornyeternity.com/todays-seamless-tile/ruby-red-jewel","Width":"1000","Height":"1000","FileSize":"198519","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=H.4658695980254904&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"160","FileSize":"4481"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=14&$top=1","type":"ImageResult"},"ID":"76de38e3-12d6-41ef-9448-c163947d3c4c","Title":"How To Know You Have Ruby Jewelry Of Value","MediaUrl":"http://www.jewelrybon.com/wp-content/uploads/ruby-ring.jpg","SourceUrl":"http://www.jewelrybon.com/how-to-know-you-have-ruby-jewelry-of-value/","DisplayUrl":"www.jewelrybon.com/how-to-know-you-have-ruby-jewelry-of-value","Width":"420","Height":"470","FileSize":"21486","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=H.4530147625074967&pid=15.1","ContentType":"image/jpg","Width":"143","Height":"160","FileSize":"2810"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=15&$top=1","type":"ImageResult"},"ID":"736e1ca7-d8ba-4569-8ba0-13ea71d0ebc8","Title":"Ruby-coloured vase with controlled air bubble inclusions forming an ...","MediaUrl":"http://www.mw-design-consult.com/GY/GL/ZM/GL_ZM_Img/Ruby_Vase_base_180x137.jpg","SourceUrl":"http://www.mw-design-consult.com/GY/GL/ZM/Ruby_Vase_Zm.html","DisplayUrl":"www.mw-design-consult.com/GY/GL/ZM/Ruby_Vase_Zm.html","Width":"1069","Height":"817","FileSize":"353219","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=H.5029171239062157&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"122","FileSize":"3495"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=16&$top=1","type":"ImageResult"},"ID":"0befff99-b50f-410a-8239-32d725f83682","Title":"Ruby stone jewelery | Anita","MediaUrl":"http://www.cat-records.com/wp-content/uploads/2010/10/ruby.jpg","SourceUrl":"http://www.cat-records.com/2010/10/ruby-stone-jewelery/","DisplayUrl":"www.cat-records.com/2010/10/ruby-stone-jewelery","Width":"1112","Height":"1257","FileSize":"447469","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4906073190041582&pid=15.1","ContentType":"image/jpg","Width":"141","Height":"160","FileSize":"5496"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=17&$top=1","type":"ImageResult"},"ID":"6e91296f-368f-49d1-9166-394f7eae4c4e","Title":"ummm red purple black","MediaUrl":"http://www.mpa-garching.mpg.de/galform/cr/CR_LCDM_dump40_1500_170000_12000_100_red.gif","SourceUrl":"http://www.sodahead.com/fun/wats-ur-fav-color/question-267484/","DisplayUrl":"www.sodahead.com/fun/wats-ur-fav-color/question-267484","Width":"1500","Height":"1500","FileSize":"797437","ContentType":"image/gif","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4548710451774602&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"160","FileSize":"4093"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=18&$top=1","type":"ImageResult"},"ID":"a45d9ab9-7b3b-4f0c-bb20-4409355c656d","Title":"Taratahi Ruby | Victoria Dahlia Society","MediaUrl":"http://www.victoriadahliasociety.org/wp-content/uploads/2011/03/Taratahi-Ruby.jpg","SourceUrl":"http://www.victoriadahliasociety.org/2011/03/samples-of-the-dahlia-tubers-and-plants-that-will-be-available-at-our-sale/taratahi-ruby/","DisplayUrl":"www.victoriadahliasociety.org/2011/03/samples-of-the-dahlia-tubers...","Width":"1436","Height":"1303","FileSize":"1250775","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=H.4742276031120371&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"145","FileSize":"4144"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=19&$top=1","type":"ImageResult"},"ID":"5d4dd768-5ec9-4f38-9d85-ac8e65d85638","Title":"Carmen Lucia Ruby","MediaUrl":"http://www.mnh.si.edu/earth/images/6_0_0_GeoGallery/specimen4110_1.jpg","SourceUrl":"http://www.mnh.si.edu/earth/text/dynamicearth/6_0_0_GeoGallery/geogallery_specimen.cfm?SpecimenID=4110&categoryID=1&categoryName=Gems&browseType=name","DisplayUrl":"www.mnh.si.edu/earth/text/dynamicearth/6_0_0_GeoGallery/geogallery...","Width":"1120","Height":"1400","FileSize":"655421","ContentType":"image/jpeg","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=H.4662544262301182&pid=15.1","ContentType":"image/jpg","Width":"128","Height":"160","FileSize":"3387"}}],"__next":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query=\u0027ruby\u0027&$skip=20&$top=20"}}
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 200 OK
2
+ Cache-Control: private
3
+ Content-Type: application/json; charset=utf-8
4
+ Server: Microsoft-IIS/7.5
5
+ X-Content-Type-Options: nosniff
6
+ Access-Control-Allow-Origin: *
7
+ Access-Control-Allow-Credentials: false
8
+ Access-Control-Allow-Headers: Authorization
9
+ Access-Control-Allow-Methods: GET, POST, OPTIONS
10
+ Access-Control-Max-Age: 604800
11
+ ActivityID: 2340cfd1-006f-4242-9ac4-702b0813e983
12
+ X-AspNet-Version: 4.0.30319
13
+ X-Powered-By: ASP.NET
14
+ Date: Tue, 06 Nov 2012 07:46:35 GMT
15
+ Content-Length: 13184
16
+
17
+ {"d":{"results":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=0&$top=1","type":"VideoResult"},"ID":"f87ec6ba-8a1c-48ea-b423-1287fd47bba3","Title":"RailsConf 2010: Gary Vaynerchuk","MediaUrl":"http://www.youtube.com/watch?v=-QWHkcCP3tA","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=56D112C9F90FD808059D56D112C9F90FD808059D&view=detail","RunTime":"3772000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=U.4982115564781686&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"3053"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=1&$top=1","type":"VideoResult"},"ID":"5f7405b5-9c4e-4f26-944d-e23e962b1059","Title":"RailsConf 2011, David Heinemeier Hansson","MediaUrl":"http://www.youtube.com/watch?v=cGdCI2HhfAU","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=10FC28D1798CE23E3E7D10FC28D1798CE23E3E7D&view=detail","RunTime":"3524000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=U.5052295353729230&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"4313"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=2&$top=1","type":"VideoResult"},"ID":"a4940728-e64a-4880-ab09-09f02907c482","Title":"RailsConf 09: Robert Martin, \"What Killed Smalltalk Could K","MediaUrl":"http://www.youtube.com/watch?v=YX3iRjKj7C0","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=8251CAB97336892C01CB8251CAB97336892C01CB&view=detail","RunTime":"3656000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=U.4887987086688288&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"5322"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=3&$top=1","type":"VideoResult"},"ID":"5d2216f9-8244-451a-8730-9224fd98a181","Title":"RailsConf 2011: Aaron Patterson, \"Double Dream Hands: So Intense!\"","MediaUrl":"http://www.youtube.com/watch?v=kWOAHIpmLAI","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=CE90871A93BF1B0AC1F4CE90871A93BF1B0AC1F4&view=detail","RunTime":"2854000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4942906818756691&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"4652"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=4&$top=1","type":"VideoResult"},"ID":"0090f1ef-a850-4e51-9495-2f317a08154b","Title":"RailsConf 2010: Robert Martin","MediaUrl":"http://www.youtube.com/watch?v=mslMLp5bQD0","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=F238F45986F98297C5B8F238F45986F98297C5B8&view=detail","RunTime":"3181000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4799798541811787&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"4644"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=5&$top=1","type":"VideoResult"},"ID":"4fb2ee56-da96-43d9-b48b-2132e010c411","Title":"RailsConf 09: Tim Ferriss, author, \"The 4-Hour Work Week\"","MediaUrl":"http://blip.tv/railsconf/railsconf-09-tim-ferriss-author-the-4-hour-work-week-2096634","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=8EEDCF1040B8A42472378EEDCF1040B8A4247237&view=detail","RunTime":"4012000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=U.4882206081614026&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"5352"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=6&$top=1","type":"VideoResult"},"ID":"ce3dcbf6-0fb9-4dbe-a706-ee7fa2e79d6f","Title":"RailsConf 2010: Yehuda Katz","MediaUrl":"http://www.youtube.com/watch?v=mo-lMdQMsdw","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=ED6D85F0C8C476FB2230ED6D85F0C8C476FB2230&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4990327559291195&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"5088"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=7&$top=1","type":"VideoResult"},"ID":"8dd0132b-525d-4092-a4c8-53b1b297240b","Title":"RailsConf 2010: Neal Ford, \"Creativity & Constraint\"","MediaUrl":"http://www.youtube.com/watch?v=c8ZQwz76wuM","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=D13CE168D71588A570FED13CE168D71588A570FE&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4770481052516611&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"8714"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=8&$top=1","type":"VideoResult"},"ID":"1da275d0-7057-49ff-92ea-82bf5b87cfee","Title":"RailsConf 2011: Eric Ries, \"Lessons Learned\"","MediaUrl":"http://www.youtube.com/watch?v=IVBVZGfzkVM","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=167EAD90E322BE8322FF167EAD90E322BE8322FF&view=detail","RunTime":"2207000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4760748686573607&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"4520"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=9&$top=1","type":"VideoResult"},"ID":"45012fef-ebdc-490f-8f35-282fe7ab3ab7","Title":"RailsConf 2011, Glenn Vanderburg, \"Craft, Engineering, and the ...","MediaUrl":"http://www.youtube.com/watch?v=LlTiMUzLMgM","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=48A9153987CFC0FE25A948A9153987CFC0FE25A9&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4541555031933047&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"3353"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=10&$top=1","type":"VideoResult"},"ID":"979a0d80-1d9c-4d54-9e6f-8a923b4be293","Title":"RailsConf 2010: David Heinemeier Hansson","MediaUrl":"http://www.youtube.com/watch?v=b0iKYRKtAsA","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=64AA3A9C575D5204FCC864AA3A9C575D5204FCC8&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=U.4618112824442985&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"3223"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=11&$top=1","type":"VideoResult"},"ID":"25f9cf2e-3f7a-44b4-b9f8-6b67ea43391e","Title":"RailsConf 2008 Git Talk by Scot Chacon Video","MediaUrl":"http://vimeo.com/1099027","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=CD942961F38FDCF29D4BCD942961F38FDCF29D4B&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts3.mm.bing.net/th?id=U.4562922512449918&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"4446"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=12&$top=1","type":"VideoResult"},"ID":"fd2b64c1-5bb7-4653-abaa-0ace297db64f","Title":"RailsConf 2010: Derek Sivers","MediaUrl":"http://www.youtube.com/watch?v=fV-phU9m9kg","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=FD4F2D250E74708A4C6FFD4F2D250E74708A4C6F&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=U.4782708853243993&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"5800"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=13&$top=1","type":"VideoResult"},"ID":"3229065f-94aa-48ea-8b7c-4d28d455f35c","Title":"RailsConf - What really goes on","MediaUrl":"http://vimeo.com/12832721","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=715567E376367D6497A2715567E376367D6497A2&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.5033156967792683&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"7728"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=14&$top=1","type":"VideoResult"},"ID":"1cd11332-5576-4aa4-b8f8-6f5b9f0d1b2d","Title":"David Chelimsky - Railsconf 2011","MediaUrl":"http://vimeo.com/24294050","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=0A38F9F094764EAD11410A38F9F094764EAD1141&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4664545715224647&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"6917"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=15&$top=1","type":"VideoResult"},"ID":"fd64fcf4-7e11-4021-b788-a4b198f6ad2f","Title":"MagLev presentation at RailsConf 2008","MediaUrl":"http://vimeo.com/1147409","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=1DEE1D0C520013019E491DEE1D0C520013019E49&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=U.4734364709617685&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"4318"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=16&$top=1","type":"VideoResult"},"ID":"a9b55c90-4296-40b7-ad58-9d5992bbbcc3","Title":"RailsConf 2008 Ruby Hero Award Video","MediaUrl":"http://vimeo.com/1099180","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=74016647E547F7C0795474016647E547F7C07954&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=U.4523834008600832&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"2831"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=17&$top=1","type":"VideoResult"},"ID":"31e56c77-2989-4e44-a876-73c6b859f4c5","Title":"RailsConf 09: David Heinemeier Hansson, \"Rails 3 ...and the real ...","MediaUrl":"http://blip.tv/railsconf/railsconf-09-david-heinemeier-hansson-rails-3-and-the-real-secret-to-high-productivity-2091808","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=CB5A2B156E418FD38E65CB5A2B156E418FD38E65&view=detail","RunTime":"0","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts1.mm.bing.net/th?id=U.4526655794577696&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"90","FileSize":"6339"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=18&$top=1","type":"VideoResult"},"ID":"07469997-1f74-406e-88c6-85eccad48b6a","Title":"Kent Beck, Three Rivers Institute (TRI): Saturday Keynote","MediaUrl":"http://blip.tv/railsconf/kent-beck-three-rivers-institute-tri-saturday-keynote-1170018","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=2D2545682DF7CF7E73902D2545682DF7CF7E7390&view=detail","RunTime":"3995000","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts4.mm.bing.net/th?id=U.4729601582104595&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"6002"}},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=19&$top=1","type":"VideoResult"},"ID":"34931799-3aa1-4dfc-8936-24deba37df60","Title":"RailsConf 2007 - Avi Bryant","MediaUrl":"http://blip.tv/railsconf/railsconf-2007-avi-bryant-574286","DisplayUrl":"http://www.bing.com/videos/search?mkt=en-US&q=&FORM=MONITR&id=D15BE58117CF034F25FDD15BE58117CF034F25FD&view=detail","RunTime":"2281151","Thumbnail":{"__metadata":{"type":"Bing.Thumbnail"},"MediaUrl":"http://ts2.mm.bing.net/th?id=U.4769823940935681&pid=15.1","ContentType":"image/jpg","Width":"160","Height":"120","FileSize":"6053"}}],"__next":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Video?Query=\u0027RailsConf\u0027&$skip=20&$top=20"}}
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 200 OK
2
+ Cache-Control: private
3
+ Content-Type: application/json; charset=utf-8
4
+ Server: Microsoft-IIS/7.5
5
+ X-Content-Type-Options: nosniff
6
+ Access-Control-Allow-Origin: *
7
+ Access-Control-Allow-Credentials: false
8
+ Access-Control-Allow-Headers: Authorization
9
+ Access-Control-Allow-Methods: GET, POST, OPTIONS
10
+ Access-Control-Max-Age: 604800
11
+ ActivityID: 31237a95-4d8c-4c26-ae53-475248f38b62
12
+ X-AspNet-Version: 4.0.30319
13
+ X-Powered-By: ASP.NET
14
+ Date: Tue, 06 Nov 2012 07:28:28 GMT
15
+ Content-Length: 10033
16
+
17
+ {"d":{"results":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=0&$top=1","type":"WebResult"},"ID":"db427aa5-9141-4471-96f6-dedd8d235c28","Title":"Ruby Programming Language","Description":"Participate in a friendly and growing community. Mailing Lists: Talk about Ruby with programmers from all around the world. User Groups: Get in contact with Rubyists ...","DisplayUrl":"www.ruby-lang.org","Url":"http://www.ruby-lang.org/"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=1&$top=1","type":"WebResult"},"ID":"990e1404-7816-43ea-bb7d-4a4443976b15","Title":"Ruby - Wikipedia, the free encyclopedia","Description":"A ruby is a pink to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). The red color is caused mainly by the presence of the element ...","DisplayUrl":"en.wikipedia.org/wiki/Ruby","Url":"http://en.wikipedia.org/wiki/Ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=2&$top=1","type":"WebResult"},"ID":"2cb8f369-66d1-4ae3-8f35-a795a15b0e04","Title":"Ruby (programming language) - Wikipedia, the free encyclopedia","Description":"Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk -like features. It was also ...","DisplayUrl":"en.wikipedia.org/wiki/Ruby_(programming_language)","Url":"http://en.wikipedia.org/wiki/Ruby_(programming_language)"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=3&$top=1","type":"WebResult"},"ID":"d09da4ca-b1ab-40c9-a3e6-1b5895251e16","Title":"Ruby | eBay - Electronics, Cars, Fashion, Collectibles, Coupons ...","Description":"Visit eBay for great deals in Pottery & Glass \u003e Glass \u003e Glassware \u003e Ruby. Shop eBay!","DisplayUrl":"www.ebay.com/sch/Ruby-/4766/i.html","Url":"http://www.ebay.com/sch/Ruby-/4766/i.html"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=4&$top=1","type":"WebResult"},"ID":"2c164583-2f1a-419d-8063-15d05820a7e9","Title":"Ruby - Welcome to ICA - All About Colored Gemstones","Description":"Red is the colour of love. It radiates warmth and a strong sense of vitality. And red is also the colour of the ruby, the king of the gemstones.","DisplayUrl":"www.gemstone.org/...id=85:ruby&catid=1:gem-by-gem&Itemid=14","Url":"http://www.gemstone.org/index.php?option=com_content&view=article&id=85:ruby&catid=1:gem-by-gem&Itemid=14"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=5&$top=1","type":"WebResult"},"ID":"9e5a32f6-93aa-41f2-b8f1-488a83d3849f","Title":"Ruby on Rails","Description":"RoR home; full stack, Web application framework optimized for sustainable programming productivity, allows writing sound code by favoring convention over ...","DisplayUrl":"rubyonrails.org","Url":"http://rubyonrails.org/"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=6&$top=1","type":"WebResult"},"ID":"5b031fe6-5ae6-49c0-bae9-21853964b455","Title":"ruby | eBay - Electronics, Cars, Fashion, Collectibles, Coupons ...","Description":"Find ruby from a vast selection of Jewelry & Watches. Shop eBay!","DisplayUrl":"www.ebay.com/sch/i.html?_nkw=ruby","Url":"http://www.ebay.com/sch/i.html?_nkw=ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=7&$top=1","type":"WebResult"},"ID":"4580b233-e0bc-41f2-87e5-a24415633e58","Title":"Ruby | Define Ruby at Dictionary.com","Description":"noun 1. a red variety of corundum, used as a gem. 2. something made of this stone or one of its imitations, as a bearing in a watch. 3. a deep-red port wine. 4. deep ...","DisplayUrl":"dictionary.reference.com/browse/ruby","Url":"http://dictionary.reference.com/browse/ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=8&$top=1","type":"WebResult"},"ID":"3c6e1c43-b1af-4917-b69e-4c52abe2e16c","Title":"Ruby (1992) - IMDb","Description":"Director: John Mackenzie. Actors: Danny Aiello: Jack Ruby · Sherilyn Fenn: Sheryl Ann DuJean / Candy Cane · Tobin Bell: David Ferrie · Joe Cortese: Louie Vitali ...","DisplayUrl":"www.imdb.com/title/tt0105291","Url":"http://www.imdb.com/title/tt0105291/"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=9&$top=1","type":"WebResult"},"ID":"b4ce55b3-71d0-4084-a3aa-a33790b3b3f6","Title":"Ruby - Supernatural... Scary Just Got Sexy!","Description":"Ruby was a black eyed demon. After the death of Azazel, she conspired with Lilith as to how they...","DisplayUrl":"supernatural.wikia.com/wiki/Ruby","Url":"http://supernatural.wikia.com/wiki/Ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=10&$top=1","type":"WebResult"},"ID":"09bb591b-7727-46fb-b402-4b8d754792e5","Title":"ruby - definition of ruby by the Free Online Dictionary, Thesaurus ...","Description":"ru·by (r b) n. pl. ru·bies. 1. A deep red, translucent variety of the mineral corundum, highly valued as a precious stone. 2. Something, such as a watch bearing ...","DisplayUrl":"www.thefreedictionary.com/ruby","Url":"http://www.thefreedictionary.com/ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=11&$top=1","type":"WebResult"},"ID":"84ed276b-4c33-47de-90a9-856c370e6da6","Title":"About Ruby","Description":"Wondering why Ruby is so popular? Its fans call it a beautiful, artful language. And yet, they say it’s handy and practical. What gives? The Ideals of Ruby’s Creator","DisplayUrl":"www.ruby-lang.org/en/about","Url":"http://www.ruby-lang.org/en/about/"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=12&$top=1","type":"WebResult"},"ID":"5ad80e7c-26cf-4cc6-8be0-d293e3054eb9","Title":"RUBY (variety of Corundum) - Amethyst Galleries\u0027 Mineral Gallery","Description":"Ruby is the red variety of corundum, the second hardest natural mineral known to antiquity. The non-red variety of corundum is Sapphire. Sapphires are well known ...","DisplayUrl":"www.galleries.com/Ruby","Url":"http://www.galleries.com/Ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=13&$top=1","type":"WebResult"},"ID":"70bcd116-4e96-4dff-b51d-b96a876640a6","Title":"Ruby: The gemstone Ruby information and pictures","Description":"Detailed gem and jewelry information guide about the corundum red gemstone ruby: information & pictures.","DisplayUrl":"www.minerals.net/gemstone/ruby_gemstone.aspx","Url":"http://www.minerals.net/gemstone/ruby_gemstone.aspx"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=14&$top=1","type":"WebResult"},"ID":"5a33ae53-89db-4c6d-81b1-667a73c3f3ad","Title":"RUBY | Facebook","Description":"RUBY. 19,558 likes · 435 talking about this. ... We love this picture of Maia in our RUBY dress on the Great Wall of China.","DisplayUrl":"www.facebook.com/rubynz","Url":"http://www.facebook.com/rubynz"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=15&$top=1","type":"WebResult"},"ID":"670a8ec1-9c49-4789-a294-5996d9ef25f3","Title":"Ruby-Doc.org: Documenting the Ruby Language","Description":"Ruby documentation project: links and downloads of programming information, on many aspects of Ruby.","DisplayUrl":"ruby-doc.org","Url":"http://ruby-doc.org/"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=16&$top=1","type":"WebResult"},"ID":"9a4ea54e-a2f5-49ed-af38-e99e7e2970c7","Title":"Ruby | Overstock.com: Buy Rings Online","Description":"Buy brand-name Ruby for everyday discount prices on Overstock.com! $2.95 shipping and product reviews on Sterling Silver, White Gold, Gemstone, & Other Rings.","DisplayUrl":"www.overstock.com/Jewelry-Watches/Ruby/14647/subcat.html","Url":"http://www.overstock.com/Jewelry-Watches/Ruby/14647/subcat.html"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=17&$top=1","type":"WebResult"},"ID":"8acbc1f1-6a02-4cb8-88b9-ae1d8278110d","Title":"ruby - Wiktionary","Description":"A clear, deep, red variety of corundum, valued as a precious stone. · A deep red colour. ruby colour: · (typography, UK) Type having a height of 5.5 ...","DisplayUrl":"en.wiktionary.org/wiki/ruby","Url":"http://en.wiktionary.org/wiki/ruby"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=18&$top=1","type":"WebResult"},"ID":"202df1dd-5b45-44b0-8d89-52e5f23fde71","Title":"Kaiser Chiefs - Ruby - YouTube","Description":"Music video by Kaiser Chiefs performing Ruby. (C) 2006 B-Unique Records Under exclusive license to Polydor Records Ltd. (UK)","DisplayUrl":"www.youtube.com/watch?v=qObzgUfCl28","Url":"http://www.youtube.com/watch?v=qObzgUfCl28"},{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=19&$top=1","type":"WebResult"},"ID":"a7f4dabc-cdb0-4cfb-a29f-b7f87d72de6b","Title":"Ruby Princess : Princess Cruises - Cruises – Cruise Deals to ...","Description":"Ruby Princess Cruise Ship. Search itineraries, view staterooms, see deck plans, find out what there is to do onboard and see where the ship is right now with the ...","DisplayUrl":"www.princess.com/learn/ships/ru/index.html","Url":"http://www.princess.com/learn/ships/ru/index.html"}],"__next":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\u0027ruby\u0027&$skip=20&$top=20"}}
data/spec/spec_helper.rb CHANGED
@@ -1,22 +1,13 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  require 'rubygems'
4
- require 'spec'
5
- require 'spec/autorun'
4
+ require 'rspec'
6
5
  require 'fakeweb'
7
6
  require 'binged'
8
7
 
9
8
  FakeWeb.allow_net_connect = false
10
9
  Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
11
10
 
12
- Spec::Runner.configure do |config|
13
-
14
- end
15
-
16
- def bing_url(url)
17
- "http://api.bing.net/json.aspx#{url}&Version=2.2&JsonType=raw&AppId=binged"
18
- end
19
-
20
11
  def fixture_file(filename)
21
12
  return '' if filename == ''
22
13
  file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
@@ -24,7 +15,7 @@ def fixture_file(filename)
24
15
  end
25
16
 
26
17
  def stub_get(url, filename, options={})
27
- fakeweb_options = {:response => fixture_file(filename)}.merge(options)
18
+ fakeweb_options = {:response => fixture_file(filename)}.merge(options)
28
19
  FakeWeb.register_uri(:get, url, fakeweb_options)
29
20
  end
30
21
 
@@ -1,13 +1,13 @@
1
1
  share_as :AnyPageable do
2
-
2
+
3
3
  it "should be able to specify the number of results per page" do
4
4
  @search.per_page(10)
5
- @search.query["#{@search.source.to_s.capitalize}.Count"].should == 10
5
+ @search.query["$top"].should == 10
6
6
  end
7
7
 
8
8
  it "should be able to specify the page number" do
9
9
  @search.page(3)
10
- @search.query["#{@search.source.to_s.capitalize}.Offset"].should == 20 * 2
10
+ @search.query["$skip"].should == 20 * 2
11
11
  end
12
-
12
+
13
13
  end