From e8ac371042d7d392f5a5995c03213aa1ff5808c2 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 1 Jul 2012 16:35:18 -0400 Subject: [PATCH] Rename Zotero.OAuth to Zotero.API, part 2 --- chrome/content/zotero/xpcom/connector/translate_item.js | 6 +++--- chrome/content/zotero/xpcom/translation/translate.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js index e0dbcd74a1..b01710237a 100644 --- a/chrome/content/zotero/xpcom/connector/translate_item.js +++ b/chrome/content/zotero/xpcom/connector/translate_item.js @@ -127,7 +127,7 @@ Zotero.Translate.ItemSaver.prototype = { } var me = this; - Zotero.OAuth.createItem({"items":newItems}, null, function(statusCode, response) { + Zotero.API.createItem({"items":newItems}, null, function(statusCode, response) { if(statusCode !== 201) { callback(false, new Error("Save to server failed")); } else { @@ -190,7 +190,7 @@ Zotero.Translate.ItemSaver.prototype = { }); } - Zotero.OAuth.createItem({"items":attachmentPayload}, itemKey, function(statusCode, response) { + Zotero.API.createItem({"items":attachmentPayload}, itemKey, function(statusCode, response) { var err; if(statusCode === 201) { try { @@ -362,7 +362,7 @@ Zotero.Translate.ItemSaver.prototype = { Zotero.Translate.ItemSaver._attachmentCallbacks[attachment.id] = function(status, error) { attachmentCallback(attachment, status, error); }; - Zotero.OAuth.uploadAttachment(attachment); + Zotero.API.uploadAttachment(attachment); }, /** diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index b629d66bc8..9a4e0357f2 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1569,7 +1569,7 @@ Zotero.Translate.Web.prototype._translateTranslatorLoaded = function() { }, function(obj) { me._translateRPCComplete(obj) }); } else if(runMode === Zotero.Translator.RUN_MODE_ZOTERO_SERVER) { var me = this; - Zotero.OAuth.createItem({"url":this.document.location.href.toString()}, null, + Zotero.API.createItem({"url":this.document.location.href.toString()}, null, function(statusCode, response) { me._translateServerComplete(statusCode, response); }); @@ -1618,7 +1618,7 @@ Zotero.Translate.Web.prototype._translateServerComplete = function(statusCode, r var me = this; this._runHandler("select", response, function(selectedItems) { - Zotero.OAuth.createItem({ + Zotero.API.createItem({ "url":me.document.location.href.toString(), "items":selectedItems }, null,