Permalink
Browse files

Changed to new FreeBase API hostname

  • Loading branch information...
1 parent d466b76 commit 79c35d9c6e0afeec7f6186ae2858f5519001ae65 @njh committed Aug 9, 2012
Showing with 10 additions and 10 deletions.
  1. +1 −1 lib/freebase_api.rb
  2. +5 −5 spec/dbpedialite_spec.rb
  3. +4 −4 spec/freebase_api_spec.rb
View
@@ -3,7 +3,7 @@
module FreebaseApi
USER_AGENT = 'DbpediaLite/1'
- MQLREAD_URI = URI.parse('http://www.freebase.com/api/service/mqlread')
+ MQLREAD_URI = URI.parse('http://api.freebase.com/api/service/mqlread')
RDF_BASE_URI = URI.parse('http://rdf.freebase.com/rdf/')
HTTP_TIMEOUT = 2
@@ -236,7 +236,7 @@ def app
:content_type => 'application/json'
)
FakeWeb.register_uri(
- :get, %r[http://www.freebase.com/api/service/mqlread],
+ :get, %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-934787.json'),
:content_type => 'application/json'
)
@@ -339,7 +339,7 @@ def app
:content_type => 'application/json'
)
FakeWeb.register_uri(
- :get, %r[http://www.freebase.com/api/service/mqlread],
+ :get, %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-934787.json'),
:content_type => 'application/json'
)
@@ -503,7 +503,7 @@ def app
:content_type => 'application/json'
)
FakeWeb.register_uri(
- :get, %r[http://www.freebase.com/api/service/mqlread],
+ :get, %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-21492980.json'),
:content_type => 'application/json'
)
@@ -575,7 +575,7 @@ def app
:content_type => 'application/json'
)
FakeWeb.register_uri(
- :get, %r[http://www.freebase.com/api/service/mqlread],
+ :get, %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-notfound.json'),
:content_type => 'application/json'
)
@@ -814,7 +814,7 @@ def app
context "flipping from a Freebase page" do
before :each do
FakeWeb.register_uri(
- :get, %r[http://www.freebase.com/api/service/mqlread],
+ :get, %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-en-new-york.json'),
:content_type => 'application/json'
)
@@ -5,7 +5,7 @@
context "looking up the Freebase MID for a Wikipedia Pageid" do
before :each do
FakeWeb.register_uri(:get,
- %r[http://www.freebase.com/api/service/mqlread],
+ %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-934787.json')
)
@data = FreebaseApi.lookup_wikipedia_pageid(934787)
@@ -35,7 +35,7 @@
context "looking up the Wikipedia Pageid for a Freebase identifier" do
before :each do
FakeWeb.register_uri(:get,
- %r[http://www.freebase.com/api/service/mqlread],
+ %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-en-new-york.json')
)
@data = FreebaseApi.lookup_by_id('/en/new_york')
@@ -73,7 +73,7 @@
context "lookup up a Wikipedia pageid that doesn't exist in Freebase" do
before :each do
FakeWeb.register_uri(:get,
- %r[http://www.freebase.com/api/service/mqlread],
+ %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-notfound.json')
)
end
@@ -88,7 +88,7 @@
context "making an invalid mqlread query" do
before :each do
FakeWeb.register_uri(:get,
- %r[http://www.freebase.com/api/service/mqlread],
+ %r[http://api.freebase.com/api/service/mqlread],
:body => fixture_data('freebase-mqlread-invalid.json')
)
end

0 comments on commit 79c35d9

Please sign in to comment.