ORCID / orcid-js

A general purpose ORCID javascript client and reference list generator, supporting CSL, citeproc-JSON and bibtex
21 stars 12 forks source link

Orcid.js seem broken #5

Closed ulli-steiner closed 6 years ago

ulli-steiner commented 7 years ago

It seems that there is an issue with orcid.js. It fails at the following routine:

client.apis["Public API v2.0_rc4"].viewActivities({orcid:orcidID}, function(data) {
        if (data && data.obj && data.obj.works)
            console.log(data.obj.works.group.length + " works found");
        var simpleWorks = orcid.activitiesToSimpleWorks(data);
        if (oneByOne)
            orcid.fetchCiteprocJSONForSimpleWorksOneByOne(simpleWorks,resolveCiteproc);                 
        else
            orcid.fetchCiteprocJSONForSimpleWorks(simpleWorks,resolveCiteproc);                 
});         

With the message:

Uncaught TypeError: Cannot read property 'viewActivities' of undefined

misilot commented 7 years ago

PR #7 should fix this issue. If you remove "_rc4" from the file and use the 2.0 API it should work as expected.

TomDemeranville commented 6 years ago

fixed and merged