Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Mendeley API class

  • Loading branch information...
commit 295d32ce5371920bcd13955bc8a2900b4fd2bbdc 1 parent bf4f0db
@vainolo vainolo authored
Showing with 39 additions and 0 deletions.
  1. +39 −0 src/main/java/org/scribe/builder/api/MendeleyApi.java
View
39 src/main/java/org/scribe/builder/api/MendeleyApi.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Arieh 'Vainolo' Bibliowicz
+ * You can use this code for educational purposes. For any other uses
+ * please contact me: vainolo@gmail.com
+ *******************************************************************************/
+package org.scribe.builder.api;
+
+import org.scribe.model.Token;
+import org.scribe.model.Verb;
+
+public class MendeleyApi extends DefaultApi10a {
+
+ private static final String AUTHORIZATION_URL = "http://api.mendeley.com/oauth/authorize?oauth_token=%s";
+
+ @Override
+ public String getRequestTokenEndpoint() {
+ return "http://api.mendeley.com/oauth/request_token/";
+ }
+
+ @Override
+ public String getAccessTokenEndpoint() {
+ return "http://api.mendeley.com/oauth/access_token/";
+ }
+
+ @Override
+ public String getAuthorizationUrl(Token requestToken) {
+ return String.format(AUTHORIZATION_URL, requestToken.getToken());
+ }
+
+ @Override
+ public Verb getAccessTokenVerb() {
+ return Verb.GET;
+ }
+
+ @Override
+ public Verb getRequestTokenVerb() {
+ return Verb.GET;
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.