www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e8ac371042d7d392f5a5995c03213aa1ff5808c2
parent f369af268d62e7246fbce60830fa31c4b7cbb249
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun,  1 Jul 2012 16:35:18 -0400

Rename Zotero.OAuth to Zotero.API, part 2

Diffstat:
Mchrome/content/zotero/xpcom/connector/translate_item.js | 6+++---
Mchrome/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 @@ -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 @@ -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,