Rename Zotero.OAuth to Zotero.API, part 2
This commit is contained in:
parent
f369af268d
commit
e8ac371042
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue