Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
The case of helen-palmer
function (t, e, n) {
"use strict";
function i () {
this.attributes({
nextLink: void 0,
initialPath: WB_wombat_self_location.pathname.replace("network/", "") +
"co-authors/"
}), this.getNextCoAuthors = r, this.after("initialize", function () {
this.on(document, "ui:co-authors:view-more", r), this.getNextCoAuthors()
})
}
function r () {
var t = this,
e = this.attr.nextLink || this.attr.initialPath;
s.get(e)
.then(function (e) {
t.attr.nextLink = e.headers.link ? o(e.headers.link)
.next : void 0, t.trigger("data:co-authors:list.success", {
profiles: e.data,
viewMore: Boolean(t.attr.nextLink)
})
})
.catch(function () {
t.trigger("data:co-authors:list.error")
})
}
function o (t) {
for (var e, n, i, r = t.split(","), o = {}, a = 0, s = r.length; a < s; a++) e = r[a].split(";"), n = e[0].replace(/[<>]/g, "")
.trim(), i = e[1].trim()
.split("=")[1].replace(/"/g, ""), o[i] = n;
return o
}
var a = n(305),
s = n(314);
t.exports = a.component(i)
}
// archive it version
window.__PRELOADED_STATE__ = {
"WB_wombat_self_location": {
"id": "fcc2fd44-d82e-45ca-8855-35ee6b8bfbe9",
"latitude": 63.44,
"longitude": 10.4,
"name": "Trondheim, Norway",
"city": "Trondheim",
"state": "Sør-Trøndelag",
"country": "Norway"
},
}
// live web version
window.__PRELOADED_STATE__ = {
"location": {
"id": "fcc2fd44-d82e-45ca-8855-35ee6b8bfbe9",
"latitude": 63.44,
"longitude": 10.4,
"name": "Trondheim, Norway",
"city": "Trondheim",
"state": "Sør-Trøndelag",
"country": "Norway"
},
}
function i() {
if (n(303), n(500), n(501), a(".error-wrapper")
.length) return !1;
var t = o.Auth.authCodeFlow({
authenticateOnStart: !1,
apiAuthenticateUrl: function() {
var t = "/sign-in/?routeTo=" + encodeURIComponent(
WB_wombat_self_location);
return WB_wombat_self_location = t
},
refreshAccessTokenUrl: "/profiles/refreshToken/"
}),
e = s.apiBaseUrl,
i = o({
authFlow: t,
baseUrl: /^https:\/\//.test(e) ? e : "https://" + e
}),
r = a.extend({
api: i,
auth: {
currentUserId: s.profileData.viewerId,
flow: t
},
authorsLimit: 6,
isViewingOwnProfile: s.profileData.viewerId === s.profileData.profileId,
currentUser: s.currentUser
}, s.profileData)
}
function(t, e, n) {
// refresh token retrieve
function r(t, e) {
if (!e.authFlow) throw new Error(
"Please provide an authentication interface");
this.request = t, this.settings = e, this.retries = 0, this.authRetries = 0
}
function o(t) {
t = t || this.request;
var e = this.settings.authFlow.getToken();
if (!e) {
if (this.authRetries < this.settings.maxAuthRetries)
return this.authRetries++,
u.call(this);
throw this.settings.authFlow.authenticate(), new Error(
"maxAuthRetries exceeded")
}
for (var n in t.headers) null !== t.headers[n] &&
void 0 !== t.headers[n] ||
delete t.headers[n];
return t.headers = d({
Accept: ""
}, t.headers), t.headers.Authorization = "Bearer " + e,
t.method = t.method
.toLowerCase(), c.request(t)
.then(s.bind(this))
.catch(a.bind(this))
}
function a(t) {
if (!t.response) throw t;
switch (t.response.status) {
case 0:
case 504:
if (this.retries < this.settings.maxRetries)
return this.retries++,
this.send();
throw t;
case 401:
if (this.authRetries < this.settings.maxAuthRetries)
return this.authRetries++,
u.call(this);
throw this.settings.authFlow.authenticate(), t;
default:
throw t
}
}
function s(t) {
var e = t.headers.WB_wombat_self_location;
if (e && this.settings.followLocation
&& 201 === t.status) {
var n = {
method: "GET",
url: e,
responseType: "json"
};
return this.send(n)
}
return t.headers.link && "string" == typeof t.headers.link
&& (t.headers.link = l(t.headers.link)), t
}
function u() {
var t = this.settings.authFlow;
if (t._refreshTokenPromise)
return t._refreshTokenPromise.then(function() {
return this.send()
}.bind(this));
var e = this.settings.authFlow.refreshToken();
if (e) {
var n = e.catch(function(e) {
delete t._refreshTokenPromise;
try {
this.settings.authFlow.authenticate()
} catch (t) {
throw e
}
}.bind(this))
.then(function() {
return delete t._refreshTokenPromise, this.send()
}.bind(this));
return t._refreshTokenPromise = n, n
}
return this.settings.authFlow.authenticate(),
p.reject(new Error("No token"))
}
function l(t) {
for (var e, n, i, r = t.split(","), o = {}, a = 0, s = r.length; a < s; a++)
e = r[a].split(";"), n = e[0].replace(/[<>]/g, "")
.trim(), i = e[1].trim()
.split("=")[1].replace(/"/g, ""), o[i] = n;
return o
}
}
function(t, e) {
t.exports = {
ANNOTATION: "application/vnd.mendeley-annotation.1+json",
DOCUMENT: "application/vnd.mendeley-document.1+json",
DOCUMENT_CLONE: "application/vnd.mendeley-document-clone.1+json",
DOCUMENT_LOOKUP: "application/vnd.mendeley-document-lookup.1+json",
FILE: "application/vnd.mendeley-file.1+json",
FOLDER: "application/vnd.mendeley-folder.1+json",
FOLLOW: "application/vnd.mendeley-follow.1+json",
FOLLOW_REQUEST: "application/vnd.mendeley-follow-request.1+json",
FOLLOW_ACCEPT: "application/vnd.mendeley-follow-acceptance.1+json",
GROUP: "application/vnd.mendeley-group.1+json",
INSTITUTION: "application/vnd.mendeley-institution.1+json",
INSTITUTION_TREE: "application/vnd.mendeley-institution-tree.1+json",
LOCATION: "application/vnd.mendeley-location.1+json",
PROFILE: "application/vnd.mendeley-profiles.1+json",
PROFILE_UPDATE: "application/vnd.mendeley-profile-amendment.1+json"
}
}
function(t, e, n) {
var i = n(432),
r = n(435);
t.exports = function(t) {
return {
search: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/catalog",
headers: {
Accept: r.DOCUMENT
}
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/catalog/{id}",
args: ["id"],
headers: {
Accept: r.DOCUMENT
}
})
}
}
}
function(t, e, n) {
var i = n(432),
r = n(435);
t.exports = function(t) {
var e = i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/documents",
headers: {
Accept: r.DOCUMENT
},
responseFilter: i.paginationFilter
}),
n = i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/folders/{id}/documents",
args: ["id"],
headers: {
Accept: r.DOCUMENT
},
responseFilter: i.paginationFilter
});
return {
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/documents",
headers: {
"Content-Type": r.DOCUMENT,
Accept: r.DOCUMENT
},
followLocation: !0
}),
createFromFile: i.requestWithFileFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/documents",
headers: {
Accept: r.DOCUMENT
}
}),
createFromFileInGroup: i.requestWithFileFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/documents",
linkType: "group",
headers: {
Accept: r.DOCUMENT
}
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/documents/{id}",
args: ["id"],
headers: {
Accept: r.DOCUMENT
}
}),
update: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/documents/{id}",
args: ["id"],
headers: {
"Content-Type": r.DOCUMENT,
Accept: r.DOCUMENT
},
followLocation: !0
}),
clone: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/documents/{id}/actions/cloneTo",
args: ["id"],
headers: {
"Content-Type": r.DOCUMENT_CLONE,
Accept: r.DOCUMENT
},
followLocation: !0
}),
list: function(t) {
if (t && "undefined" != typeof t.folderId) {
var i = t.folderId,
r = {
limit: t.limit
};
return delete t.folderId, n.call(this, i, r)
}
return e.call(this, t)
},
search: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/search/documents",
headers: {
Accept: r.DOCUMENT
},
responseFilter: i.paginationFilter
}),
trash: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/documents/{id}/trash",
args: ["id"]
})
}
}
}
var Mendeley = Mendeley || {};
Mendeley.profileData = {/*global info about the profile*/};
Mendeley.apiBaseUrl = "api.mendeley.com";
Mendeley.apiClientId = "1127";
Mendeley.webBaseUrl = "www.mendeley.com";
url_prefix: 'com,mendeley,static)/weblet-profiles/build/1231/js/index.js'
rewrite:
js_regexs:
- match: 'var\st=e;'
replace: 'var t=e; console.log(e);'
- match: 'f=e.headers;'
replace: 'f=e.headers;console.log(e);'
- match: 'c=arguments\[u\];'
replace: 'c=arguments[u];console.log(arguments);'
- match: 'var t=this\.settings\.authFlow\.getToken\(\);'
replace: 'console.log(e,this);var t = this.settings.authFlow.getToken();'
- match: 'return this\.isLoggedIn\(\)'
replace: 'console.log("login",this);return this.isLoggedIn()'
- match: 'this.attr.initialPath;'
replace: 'this.attr.initialPath;console.log(this);'
- match: 'return e\.trigger\(\"store:publications:set.error\"\)'
replace: 'console.log(t,e);return e.trigger("store:publications:set.error")'
function(e, t, n) {
"use strict";
function r() {
this.attributes({
nextLink: void 0,
initialPath: window.location.pathname.replace("network/", "") +
"co-authors/"
}), this.getNextCoAuthors = i, this.after("initialize", function() {
this.on(document, "ui:co-authors:view-more", i), this.getNextCoAuthors()
})
}
function i() {
var e = this,
t = this.attr.nextLink || this.attr.initialPath;
s.get(t)
.then(function(t) {
e.attr.nextLink = t.headers.link ? o(t.headers.link)
.next : void 0, e.trigger("data:co-authors:list.success", {
profiles: t.data,
viewMore: Boolean(e.attr.nextLink)
})
})
.catch(function() {
e.trigger("data:co-authors:list.error")
})
}
function o(e) {
for (var t, n, r, i = e.split(","), o = {}, a = 0, s = i.length; a < s; a++)
t = i[a].split(";"), n = t[0].replace(/[<>]/g, "")
.trim(), r = t[1].trim()
.split("=")[1].replace(/"/g, ""), o[r] = n;
return o
}
var a = n(305),
s = n(314);
e.exports = a.component(r)
}
window.__PRELOADED_STATE__ = {
"location": {
"id": "fcc2fd44-d82e-45ca-8855-35ee6b8bfbe9",
"latitude": 63.44,
"longitude": 10.4,
"name": "Trondheim, Norway",
"city": "Trondheim",
"state": "Sør-Trøndelag",
"country": "Norway"
},
}
function (t, e) {
t.exports = {
ANNOTATION: "application/vnd.mendeley-annotation.1+json",
DOCUMENT: "application/vnd.mendeley-document.1+json",
DOCUMENT_CLONE: "application/vnd.mendeley-document-clone.1+json",
DOCUMENT_LOOKUP: "application/vnd.mendeley-document-lookup.1+json",
FILE: "application/vnd.mendeley-file.1+json",
FOLDER: "application/vnd.mendeley-folder.1+json",
FOLLOW: "application/vnd.mendeley-follow.1+json",
FOLLOW_REQUEST: "application/vnd.mendeley-follow-request.1+json",
FOLLOW_ACCEPT: "application/vnd.mendeley-follow-acceptance.1+json",
GROUP: "application/vnd.mendeley-group.1+json",
INSTITUTION: "application/vnd.mendeley-institution.1+json",
INSTITUTION_TREE: "application/vnd.mendeley-institution-tree.1+json",
LOCATION: "application/vnd.mendeley-location.1+json",
PROFILE: "application/vnd.mendeley-profiles.1+json",
PROFILE_UPDATE: "application/vnd.mendeley-profile-amendment.1+json"
}
}
function (t, e, n) {
var i = n(430),
r = n(428)
.MimeTypes;
t.exports = i(r, {
ALERT: "application/vnd.mendeley-alert+json",
ALERT_LIST: "application/vnd.mendeley-expanded-alert-list+json",
AUTHOR_PROFILE: "application/vnd.mendeley-author-profile.1+json",
BIBTEX: "application/x-bibtex",
COMMENT: "application/vnd.mendeley-comment+json",
COMMENT_UPDATE: "application/vnd.mendeley-comment-update+json",
COMMUNITY: "application/vnd.mendeley-community+json",
COMMUNITY_DOCUMENT_FILE: "application/vnd.mendeley-document-file+json",
COMMUNITY_DOCUMENT_LIST: "application/vnd.mendeley-community-document-list+json",
COMMUNITY_LIST: "application/vnd.mendeley-community-list+json",
COMMUNITY_MEMBER_LIST: "application/vnd.mendeley-community-member-list+json",
COMMUNITY_INVITATION_LIST: "application/vnd.mendeley-community-invitation-list+json",
CONTENT_TICKET: "application/vnd.mendeley-content-ticket.1+json",
EDITORSHIP: "application/vnd.mendeley-editorship.1+json",
EDITORSHIP_UPDATE: "application/vnd.mendeley-editorship-amendment.1+json",
EDUCATION: "application/vnd.mendeley-education.1+json",
EDUCATION_CUSTOM_INSTITUTION: "application/vnd.mendeley-education-custom-institution.1+json",
EDUCATION_UPDATE: "application/vnd.mendeley-education-amendment.1+json",
EMPLOYMENT: "application/vnd.mendeley-employment.1+json",
EMPLOYMENT_CUSTOM: "application/vnd.mendeley-employment-custom-institution.1+json",
EMPLOYMENT_UPDATE: "application/vnd.mendeley-employment-amendment.1+json",
ENDNOTE: "application/vnd.mendeley-endnote+xml",
EXPANDED_COMMENT_LIST: "application/vnd.mendeley-expanded-comment-list+json",
EXPANDED_LIKE_LIST: "application/vnd.mendeley-expanded-like-list+json",
EXTERNAL_APP_LINKS: "application/vnd.mendeley-new-external-application-link+json",
FEATURE: "application/vnd.mendeley-features.1+json",
FILE_CONTENT: "application/vnd.mendeley-file-content.1+json",
FOLLOWER_SUMMARY: "application/vnd.mendeley-follow-summary.1+json",
GROUP_CREATE: "application/vnd.mendeley-group+json",
GROUP_INVITATION: "application/vnd.mendeley-group-invitation+json",
GROUP_INVITATION_LIMIT: "application/vnd.mendeley-group-limits+json",
GROUP_INVITATION_RESPONSE_LIST: "application/vnd.mendeley-group-invitation-response-list+json",
GROUP_MEMBERSHIP: "application/vnd.mendeley-group-membership+json",
GROUP_USER_POST: "application/vnd.mendeley-group-user-post+json",
INSTITUTION_CONTRACT: "application/vnd.registered-institution-contract.1+json",
INSTITUTION_MEMBER: "application/vnd.registered-institution-member.1+json",
INSTITUTION_PRODUCT: "application/vnd.registered-institution-product.1+json",
JSON: "application/json",
JSON_PATCH: "application/json-patch+json",
LIBRARY_IMPORT_TASK: "application/vnd.mendeley-library-import-task+json",
LIBRARY_IMPORT_TASK_UPDATE: "application/vnd.mendeley-library-import-task-update+json",
MESSAGE: "application/vnd.mendeley-message.1+json",
MIGRATION_CONSENT: "application/vnd.mendeley-migration-consent+json",
NEW_EDITORSHIP: "application/vnd.mendeley-new-editorship.1+json",
NEW_EDUCATION: "application/vnd.mendeley-new-education.1+json",
NEW_EMPLOYMENT: "application/vnd.mendeley-new-employment.1+json",
NEW_PROFILE: "application/vnd.mendeley-new-profile.1+json",
NEW_USER_POST: "application/vnd.mendeley-new-user-post+json",
NEW_GROUP_USER_POST: "application/vnd.mendeley-new-group-user-post+json",
NEWS_ITEM_LIST: "application/vnd.mendeley-news-item-list+json",
NEWS_ITEMS_SHARE: "application/vnd.mendeley-news-items-share+json",
NEWS_ITEMS_SHARE_DOCUMENT: "application/vnd.mendeley-news-items-share-document+json",
NEWS_SHARER_LIST: "application/vnd.mendeley-news-sharer-list+json",
NONE: "application/none",
NULL: "",
ORCID_IMPORT: "application/vnd.mendeley-orcid-profile+xml",
PEOPLE_RECOMMENDATION: "application/vnd.mendeley-people-rec.1+json",
PLAIN_DOCUMENT: "application/vnd.mendeley-plain-document.1+json",
PROFILE_MIGRATION: "application/vnd.mendeley-profiles-migration.1+json",
PROFILE_SETTINGS: "application/vnd.mendeley-profile-settings+json",
RECENTLY_READ: "application/vnd.mendeley-recently-read.1+json",
RECOMMENDATION_FEEDBACK: "application/vnd.mendeley-rec-feedback.1+json",
RECOMMENDATION_TRACE: "application/vnd.mendeley-recommendation-trace.1+json",
REGISTERED_INSTITUTION: "application/vnd.registered-institution.1+json",
RIS: "application/vnd.mendeley-ris",
SIGN_IN_REQUEST: "application/vnd.mendeley-signin-request.1+json",
SIGN_IN_RESPONSE: "application/vnd.mendeley-signin-response.1+json",
SCOPUS_IMPORT: "application/vnd.mendeley-scopus-import+json",
SUBJECT_AREA: "application/vnd.mendeley-subject-area.1+json",
USER_POST: "application/vnd.mendeley-user-post+json"
})
}
function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/application_features",
headers: {
Accept: r.FEATURE,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
isOn: function (t) {
return this.list()
.then(function (e) {
return e.items.some(function (e) {
return e.name === t
})
})
.catch(function () {
return !1
})
}
}
}
},
function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/comments/v1",
headers: {
Accept: r.EXPANDED_COMMENT_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/comments/v1",
headers: {
Accept: r.COMMENT,
"Content-Type": r.COMMENT,
"Development-Token": t.devToken
}
}),
update: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/comments/v1/{id}",
args: ["id"],
headers: {
Accept: r.COMMENT_UPDATE,
"Content-Type": r.COMMENT_UPDATE,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/comments/v1/{id}",
args: ["id"],
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/{id}",
args: ["id"],
headers: {
Accept: r.COMMUNITY,
"Development-Token": t.devToken
}
}),
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1",
args: [],
headers: {
Accept: r.COMMUNITY_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
popular: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/popular",
args: [],
headers: {
Accept: r.COMMUNITY_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
members: {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/{id}/members",
args: ["id"],
headers: {
Accept: r.COMMUNITY_MEMBER_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
})
},
invitations: {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/invitations",
args: [],
headers: {
Accept: r.COMMUNITY_INVITATION_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
})
},
documents: {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/{id}/documents",
args: ["id"],
headers: {
Accept: r.COMMUNITY_DOCUMENT_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
file: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/communities/v1/document/{documentId}/file/{fileId}",
args: ["documentId", "fileId"],
headers: {
Accept: r.COMMUNITY_DOCUMENT_FILE,
"Development-Token": t.devToken
}
})
}
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/education",
headers: {
Accept: r.EDUCATION,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/education/{id}",
args: ["id"],
headers: {
Accept: r.EDUCATION,
"Development-Token": t.devToken
}
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/education",
headers: {
"Content-Type": r.NEW_EDUCATION,
Accept: r.EDUCATION,
"Development-Token": t.devToken
}
}),
createCustom: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/education",
headers: {
"Content-Type": r.EDUCATION_CUSTOM_INSTITUTION,
Accept: r.EDUCATION,
"Development-Token": t.devToken
}
}),
update: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/education/{id}",
args: ["id"],
headers: {
"Content-Type": r.EDUCATION_UPDATE,
Accept: r.EDUCATION,
"Development-Token": t.devToken
}
}),
updateCustom: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/education/{id}",
args: ["id"],
headers: {
"Content-Type": r.EDUCATION_CUSTOM_INSTITUTION,
Accept: r.EDUCATION,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/education/{id}",
args: ["id"],
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/employment",
headers: {
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/employment/{id}",
args: ["id"],
headers: {
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
}
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/employment",
headers: {
"Content-Type": r.NEW_EMPLOYMENT,
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
}
}),
createCustom: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/employment",
headers: {
"Content-Type": r.EMPLOYMENT_CUSTOM,
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
}
}),
update: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/employment/{id}",
args: ["id"],
headers: {
"Content-Type": r.EMPLOYMENT_UPDATE,
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
}
}),
updateCustom: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/employment/{id}",
args: ["id"],
headers: {
"Content-Type": r.EMPLOYMENT_CUSTOM,
Accept: r.EMPLOYMENT,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/employment/{id}",
args: ["id"],
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/editorship",
headers: {
Accept: r.EDITORSHIP,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/editorship/{id}",
args: ["id"],
headers: {
Accept: r.EDITORSHIP,
"Development-Token": t.devToken
}
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/editorship",
headers: {
"Content-Type": r.NEW_EDITORSHIP,
Accept: r.EDITORSHIP,
"Development-Token": t.devToken
}
}),
update: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/editorship/{id}",
args: ["id"],
headers: {
"Content-Type": r.EDITORSHIP_UPDATE,
Accept: r.EDITORSHIP,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/editorship/{id}",
args: ["id"],
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
emit: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/events",
headers: {
"Content-Type": r.JSON,
"Development-Token": t.devToken
}
}),
batch: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/events/_batch",
headers: {
"Content-Type": r.JSON,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
create: i.requestWithFileFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/file_content",
headers: {
Accept: r.CONTENT_TICKET,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
convert: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/ids/{id}",
args: ["id"],
headers: {
Accept: r.JSON,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/news_items/v1/{id}/likers",
args: ["id"],
headers: {
Accept: r.EXPANDED_LIKE_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/news_items/v1/{id}/likers",
args: ["id"],
headers: {
"Content-Type": r.NULL,
Accept: r.NULL,
"Development-Token": t.devToken
}
}),
delete: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/news_items/v1/{id}/likers/me",
args: ["id"],
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
send: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/messages",
headers: {
"Content-Type": r.MESSAGE,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
lookup: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/metadata/{identifier}",
args: ["identifier"],
headers: {
Accept: r.PLAIN_DOCUMENT,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
shareNewsItem: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/news_items/v1/actions/share",
headers: {
"Content-Type": r.NEWS_ITEMS_SHARE,
"Development-Token": t.devToken
}
}),
shareDocument: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/news_items/v1/actions/share",
headers: {
"Content-Type": r.NEWS_ITEMS_SHARE_DOCUMENT,
"Development-Token": t.devToken
}
}),
listOfSharers: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/news_items/v1/{id}/sharers",
args: ["id"],
headers: {
Accept: r.NEWS_SHARER_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/news_items/v2",
headers: {
Accept: r.NEWS_ITEM_LIST,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
postStatus: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/user_posts/v1",
headers: {
"Content-Type": r.NEW_USER_POST,
Accept: r.USER_POST,
"Development-Token": t.devToken
}
}),
postGroupStatus: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/group_user_posts/v1",
headers: {
"Content-Type": r.NEW_GROUP_USER_POST,
Accept: r.GROUP_USER_POST,
"Development-Token": t.devToken
}
}),
deleteStatus: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/user_posts/v1/{id}",
args: ["id"],
headers: {
"Content-Type": r.NULL,
Accept: r.NULL,
"Development-Token": t.devToken
}
}),
deleteGroupStatus: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/group_user_posts/v1/{id}",
args: ["id"],
headers: {
"Content-Type": r.NULL,
Accept: r.NULL,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432);
t.exports = function (t) {
return {
me: i.requestWithFileFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/photos/me",
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/recently_read",
headers: {
Accept: r.RECENTLY_READ,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/recently_read",
headers: {
"Content-Type": r.RECENTLY_READ,
Accept: r.RECENTLY_READ,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/recently_read",
headers: {
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
people: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/recommendations/people/{recommender}",
args: ["recommender"],
headers: {
Accept: r.PEOPLE_RECOMMENDATION,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
peopleFeedback: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/recommendations/people/action/feedback",
headers: {
"Content-Type": r.RECOMMENDATION_FEEDBACK,
"Development-Token": t.devToken
}
}),
documentFeedback: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/recommendations/action/feedback",
headers: {
"Content-Type": r.RECOMMENDATION_FEEDBACK,
"Development-Token": t.devToken
}
}),
trace: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/recommendations/trace",
headers: {
"Content-Type": r.RECOMMENDATION_TRACE,
Accept: r.RECOMMENDATION_TRACE,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/registered_institution_contracts",
headers: {
"Content-Type": r.INSTITUTION_CONTRACT,
Accept: r.INSTITUTION_CONTRACT,
"Development-Token": t.devToken
}
}),
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_contracts",
headers: {
Accept: r.INSTITUTION_CONTRACT,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_contracts/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_CONTRACT,
"Development-Token": t.devToken
}
}),
modify: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/registered_institution_contracts/{id}",
args: ["id"],
headers: {
"Content-Type": r.JSON_PATCH,
Accept: r.INSTITUTION_CONTRACT,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/registered_institution_contracts/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_CONTRACT,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_members",
headers: {
Accept: r.INSTITUTION_MEMBER,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/registered_institution_members",
headers: {
"Content-Type": r.INSTITUTION_MEMBER,
Accept: r.INSTITUTION_MEMBER,
"Development-Token": t.devToken
}
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_members/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_MEMBER,
"Development-Token": t.devToken
}
}),
modify: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/registered_institution_members/{id}",
args: ["id"],
headers: {
"Content-Type": r.JSON_PATCH,
Accept: r.INSTITUTION_MEMBER,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/registered_institution_members/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_MEMBER,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_products",
headers: {
Accept: r.INSTITUTION_PRODUCT,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/registered_institution_products",
headers: {
"Content-Type": r.INSTITUTION_PRODUCT,
Accept: r.INSTITUTION_PRODUCT,
"Development-Token": t.devToken
}
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institution_products/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_PRODUCT,
"Development-Token": t.devToken
}
}),
modify: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/registered_institution_products/{id}",
args: ["id"],
headers: {
"Content-Type": r.JSON_PATCH,
Accept: r.INSTITUTION_PRODUCT,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/registered_institution_products/{id}",
args: ["id"],
headers: {
Accept: r.INSTITUTION_PRODUCT,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
list: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institutions",
headers: {
Accept: r.REGISTERED_INSTITUTION,
"Development-Token": t.devToken
},
responseFilter: i.paginationFilter
}),
create: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/registered_institutions",
headers: {
"Content-Type": r.REGISTERED_INSTITUTION,
Accept: r.REGISTERED_INSTITUTION,
"Development-Token": t.devToken
}
}),
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/registered_institutions/{id}",
args: ["id"],
headers: {
Accept: r.REGISTERED_INSTITUTION,
"Development-Token": t.devToken
}
}),
modify: i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "PATCH",
resource: "/registered_institutions/{id}",
args: ["id"],
headers: {
"Content-Type": r.JSON_PATCH,
Accept: r.REGISTERED_INSTITUTION,
"Development-Token": t.devToken
}
}),
delete: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "DELETE",
resource: "/registered_institutions/{id}",
args: ["id"],
headers: {
Accept: r.REGISTERED_INSTITUTION,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return i.requestWithDataFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "POST",
resource: "/signin",
headers: {
Accept: r.SIGN_IN_RESPONSE,
"Content-Type": r.SIGN_IN_REQUEST
}
})
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
retrieveArticleAuthors: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/scopus/article_authors/{eid}",
args: ["eid"],
headers: {
Accept: r.JSON,
"Development-Token": t.devToken
}
}),
retrieveScopusAuthorSuggestions: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/scopus/suggestions/me?threshold={threshold}",
args: ["threshold"],
headers: {
Accept: r.JSON,
"Development-Token": t.devToken
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(463);
t.exports = function (t) {
return {
retrieve: i.requestFun({
authFlow: t.authFlow,
baseUrl: t.baseUrl,
method: "GET",
resource: "/subject_areas",
headers: {
Accept: r.SUBJECT_AREA
}
})
}
}
}, function (t, e, n) {
var i = n(432),
r = n(488),
o = n(463);
t.exports = function (t, e) {
var n = i.requestFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "GET",
resource: "/documents",
headers: {
Accept: o.DOCUMENT,
"Development-Token": e.devToken
},
responseFilter: i.paginationFilter
}),
a = i.requestFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "GET",
resource: "/macro/folder_documents",
headers: {
Accept: o.DOCUMENT,
"Development-Token": e.devToken
},
responseFilter: i.paginationFilter
});
t.cloneFiles = i.requestWithDataFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
responseFilter: function (t, e) {
return {
status: e.status
}
},
method: "POST",
resource: "/documents/{id}/actions/cloneFilesTo",
args: ["id"],
headers: {
"Content-Type": o.DOCUMENT,
Accept: o.JSON,
"Development-Token": e.devToken
},
followLocation: !0
}), t.importFromEndNote = i.requestWithFileFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
responseFilter: function (t, e) {
return {
location: e.headers.WB_wombat_self_location
}
},
method: "POST",
resource: "/documents/v1/tasks/library_import",
headers: {
"Content-Type": o.ENDNOTE,
"Development-Token": e.devToken
}
}), t.importFromRis = i.requestWithFileFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
responseFilter: function (t, e) {
return {
location: e.headers.WB_wombat_self_location
}
},
method: "POST",
resource: "/documents/v1/tasks/library_import",
headers: {
"Content-Type": o.RIS,
"Development-Token": e.devToken
}
}), t.importFromBibtex = i.requestWithFileFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
responseFilter: function (t, e) {
return {
location: e.headers.WB_wombat_self_location
}
},
method: "POST",
resource: "/documents/v1/tasks/library_import",
headers: {
"Content-Type": o.BIBTEX,
"Development-Token": e.devToken
}
}), t.importFromScopus = i.requestWithDataFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "POST",
resource: "/documents/v1/tasks/library_import",
headers: {
"Content-Type": o.SCOPUS_IMPORT,
"Development-Token": e.devToken
},
responseFilter: function (t, e) {
return e.headers
}
}), t.importFromOrcid = i.requestWithFileFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "POST",
resource: "/documents/v1/tasks/library_import",
headers: {
"Content-Type": o.ORCID_IMPORT,
"Development-Token": e.devToken
},
responseFilter: function (t, e) {
return e.headers
}
}), t.getImportStatus = i.requestFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "GET",
resource: "/documents/v1/tasks/library_import/{id}",
args: ["id"],
headers: {
Accept: o.LIBRARY_IMPORT_TASK,
"Development-Token": e.devToken
}
});
var s = i.requestWithDataFun({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
method: "PATCH",
resource: "/documents/v1/tasks/library_import/{id}",
args: ["id"],
headers: {
"Content-Type": o.LIBRARY_IMPORT_TASK_UPDATE,
"Development-Token": e.devToken
}
});
t.cancelImport = function (t) {
return s.call(this, t, {
status: "cancelled"
})
}, t.pollImportStatusUntilComplete = function (t) {
return r.resolveTaskPromiseAndPoll({
authFlow: e.authFlow,
baseUrl: e.baseUrl,
requestPromise: t,
pollHeaders: {
Accept: o.LIBRARY_IMPORT_TASK,
"Development-Token": e.devToken
},
pollingInterval: 2e3,
stoppingCondition: function (t) {
return !("in_progress" === t.status || "cancelling" === t.status)
}
})
}, t.list = function (t) {
var e = t && "undefined" != typeof t.folder_id ? a : n;
return e.call(this, t)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment