File tree Expand file tree Collapse file tree
src/main/java/org/scribe/builder/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .scribe .builder .api ;
2+
3+ import org .scribe .model .*;
4+
5+ /**
6+ * @author Arieh "Vainolo" Bibliowicz
7+ * @see http://apidocs.mendeley.com/home/authentication
8+ */
9+ public class MendeleyApi extends DefaultApi10a
10+ {
11+
12+ private static final String AUTHORIZATION_URL = "http://api.mendeley.com/oauth/authorize?oauth_token=%s" ;
13+
14+ @ Override
15+ public String getRequestTokenEndpoint ()
16+ {
17+ return "http://api.mendeley.com/oauth/request_token/" ;
18+ }
19+
20+ @ Override
21+ public String getAccessTokenEndpoint ()
22+ {
23+ return "http://api.mendeley.com/oauth/access_token/" ;
24+ }
25+
26+ @ Override
27+ public String getAuthorizationUrl (Token requestToken )
28+ {
29+ return String .format (AUTHORIZATION_URL , requestToken .getToken ());
30+ }
31+
32+ @ Override
33+ public Verb getAccessTokenVerb ()
34+ {
35+ return Verb .GET ;
36+ }
37+
38+ @ Override
39+ public Verb getRequestTokenVerb ()
40+ {
41+ return Verb .GET ;
42+ }
43+ }
You can’t perform that action at this time.
0 commit comments