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
function defineGetters (context, obj) { | |
this.get = {}; | |
// we iterate over the object via underscore creating getter functions | |
_.each(obj, function (val, ind, list) { | |
this.get[ind] = function() { | |
return ( !_.isObject(val) || _.isArray(val) ? val : $.extend({}, val, true) ); | |
}; | |
}, this); | |
} |
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 = {}; |
NewerOlder