Skip to content

Commit

Permalink
Merge pull request scribejava#301 from vainolo/master
Browse files Browse the repository at this point in the history
Added Mendeley API
  • Loading branch information
fernandezpablo85 committed Sep 13, 2012
2 parents 422fb2b + ca470f8 commit 7b4fe73
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/main/java/org/scribe/builder/api/MendeleyApi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package org.scribe.builder.api;

import org.scribe.model.*;

/**
* @author Arieh "Vainolo" Bibliowicz
* @see http://apidocs.mendeley.com/home/authentication
*/
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;
}
}

0 comments on commit 7b4fe73

Please sign in to comment.