Author Archives: Paul Willoughby

About Paul Willoughby

Web team lead and front-end developer at Mendeley.

Announcing our JavaScript SDK

The front-end team here at Mendeley have been working on a bunch of new products built on top of the APIs, and today we’d like to share with you our JavaScript SDK on GitHub.

Our aim was to make it simple for developers to build awesome single page apps without having to repeat all the boiler plate of creating Ajax requests, extracting headers and handling OAuth flows.

It’s built on top of jQuery’s promises, so you can handles responses without writing pyramid-of-doom style code. For example here’s how to get a document by id using the standalone version (we also have AMD modules):

    MendeleySDK.API.documents.retrieve(documentId)
         .done(function(doc) { console.log(doc); });

You can find more docs, info and examples over on GitHub.

Not all the API endpoints are supported yet, but we’re dog-fooding this SDK internally so expect more to be added over the next few months. In the meantime, we’d love your pull requests and feedback to api@mendeley.com.

BTW big thanks to our platform team for enabling CORS by default 🙂