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