Created
May 24, 2013 01:21
-
-
Save veryeasily/5640712 to your computer and use it in GitHub Desktop.
Here is this San Francisco topic search with additional logging to show that the whole object with tons of stuff is returned. Make sure to do CTRL-J to open up the console to see the log (of course)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> | |
var topic_id = '/en/san_francisco'; | |
var service_url = 'https://www.googleapis.com/freebase/v1/topic'; | |
var params = {}; | |
$.getJSON(service_url + topic_id + '?callback=?', params, function(topic) { | |
console.log(topic); | |
console.log(topic.property['/common/topic/topic_equivalent_webpage']); | |
$('<div>',{text:topic.property['/type/object/name'].values[0].text}).appendTo(document.body); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment