Replace Google API key for Suggest - fixes #679

This commit is contained in:
Tom Morris 2013-03-12 17:27:58 -04:00
parent 7b9f6836e1
commit 054ea643c3

View File

@ -33,6 +33,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var CustomSuggest = {}; var CustomSuggest = {};
// Default API key for Refine to use for freebase suggest widget
//CustomSuggest.setFreebaseAPIKey("AIzaSyBBTAtJ31v_jlg_ImbQuBNnAaAyrHzRyW8"); // Google key
CustomSuggest.FREEBASE_API_KEY = "AIzaSyBAZ_EjMPKlOzyyZXv6JKXPPwJFISVji3M"; // OpenRefine default key
CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) { CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
$.suggest.suggest.defaults.key = freebaseAPIKey; $.suggest.suggest.defaults.key = freebaseAPIKey;
$.suggest.suggestT.defaults.key = freebaseAPIKey; $.suggest.suggestT.defaults.key = freebaseAPIKey;
@ -173,8 +177,7 @@ CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
if (data.value && data.value != "null") { if (data.value && data.value != "null") {
CustomSuggest.setFreebaseAPIKey(data.value); CustomSuggest.setFreebaseAPIKey(data.value);
} else { } else {
// Default API key for Refine to use for freebase suggest widget CustomSuggest.setFreebaseAPIKey(CustomSuggest.FREEBASE_API_KEY);
CustomSuggest.setFreebaseAPIKey("AIzaSyBBTAtJ31v_jlg_ImbQuBNnAaAyrHzRyW8");
} }
} }
} }