CINXE.COM
Sample Code - Mendeley Developer Portal
<!DOCTYPE html> <!--[if lt IE 8 ]> <html lang="en" class="no-js ie ie7 no-js"> <![endif]--> <!--[if lt IE 9 ]> <html lang="en" class="no-js ie ie8 no-js"> <![endif]--> <!--[if lt IE 10 ]> <html lang="en" class="no-js ie ie9 no-js"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <link rel="shortcut icon" href="images/favicon-2.ico"> <title>Sample Code - Mendeley Developer Portal</title> <!-- OneTrust Cookies Consent Banner --> <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="bfc52c48-f7c5-45a4-a7e0-e44db83eeff9"></script> <!-- OneTrust Cookies Consent Notice end --> <script src="/bower/es5-shim/es5-shim.min.js"></script> <script src="/bower/html5shiv/dist/html5shiv.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="/bower/bootstrap/js/dropdown.js"></script> <script data-main="../js/config" src="../bower/requirejs/require.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script> <script> WebFont.load({ google: { families: ["Merriweather:300,400,700,900", "Open Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic"] } }); </script> <script> $(function () { $("#page-header").load("../header.html"); $("#page-footer").load("../footer.html"); }); </script> <!-- Bootstrap core CSS --> <link href="/css/screen.css" rel="stylesheet"> <script type="text/javascript"> window.mendeley = {}; require(['config'], function (appConfig) { appConfig.getAdobeLaunchScriptTag(); }); </script> </head> <body id="sample-code-page"> <!-- header loaded externally --> <div id="page-header"> </div> <!-- Main Content START --> <section class="section-freetext section-introtext"> <div class="container"> <div class="row"> <h2 class="col-md-12 title">Sample code</h2> <p>Sample tools and applications illustrating API requests and authorization flow</p> </div> </div> </section> <section class="long-page-section"> <div class="container"> <div class="row"> <h3>JavaScript</h3> <a name="javascript_readership_locations"></a> <h4>JavaScript Readership Locations</h4> <p>A JavaScript example showing document reader locations plotted onto a world map. Illustrates implicit OAuth flow, fetching user documents and requesting readership statistics for catalog documents. <a href="https://github.com/Mendeley/mendeley-api-javascript-readership-map" target="_blank">GitHub source code repository</a></p> </div> </div> </section> <section class="long-page-section"> <div class="container"> <div class="row"> <h3>Python</h3> <a name="python_example"></a> <h4>Python Example</h4> <p>A Python web application, written using Flask, which shows documents in the user's Mendeley library together with the document annotations. Catalog documents can also be retrieved using a DOI. <a href="https://github.com/Mendeley/mendeley-api-python-example" target="_blank">GitHub source code repository</a></p> <a name="python_catalog_example"></a> <h4>Python Catalog Example</h4> <p>A command-line Python script that retrieves the number of Mendeley users that have read a document. The script uses an OAuth client credentials flow, so users don't have to log in to use the application. <a href="https://github.com/Mendeley/mendeley-api-python-catalog-example" target="_blank">GitHub source code repository</a></p> </div> </div> </section> <section class="long-page-section"> <div class="container"> <div class="row"> <h3>Ruby</h3> <a name="ruby_file_in_catalog"></a> <h4>Ruby Auth </h4> <p>This Ruby gem will provide you with a simple library to obtain tokens to use the <a href="http://dev.mendeley.com/reference/topics/authorization_client_credentials.html">Client Credentials Flow</a> or the <a href="http://dev.mendeley.com/reference/topics/authorization_implicit.html">Implicit Grant Flow</a> to access the Mendeley API <a href="https://github.com/Mendeley/mendeley-ruby-auth" target="_blank">GitHub source code repository</a></p> <h4>Ruby Identifier Catalog Search</h4> <p>A Ruby example script that populates a command-line user interface with identifier_types, and then performs a search for a catalog document using the chosen identifier type. <a href="https://github.com/Mendeley/mendeley-api-ruby-identifier-catalog-search" target="_blank">GitHub source code repository</a></p> <a name="ruby_file_in_catalog"></a> <h4>Ruby Catalog Search</h4> <p>A command-line Ruby script, taking a file argument, that searches for a Catalog document referencing the same file. Illustrates client credentials OAuth flow and requesting a catalog document using a SHA1 hash of a file. <a href="https://github.com/Mendeley/mendeley-api-ruby-is-file-in-catalog" target="_blank">GitHub source code repository</a></p> </div> </div> </section> <!-- Main Content: END --> <!-- footer loaded externally --> <div id="page-footer"> </div> <script src="../js/adobe-analytics.js" type="text/javascript"> </script> </body> </html> <!-- / dinah -->