Skip to content

Loading…

readability.com API: http://www.readability.com/developers/api #310

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 28 additions and 0 deletions.
  1. +28 −0 src/main/java/org/scribe/builder/api/ReadabilityApi.java
View
28 src/main/java/org/scribe/builder/api/ReadabilityApi.java
@@ -0,0 +1,28 @@
+package org.scribe.builder.api;
+
+import org.scribe.model.Token;
+
+public class ReadabilityApi extends DefaultApi10a
+{
+ private static final String AUTHORIZE_URL = "https://www.readability.com/api/rest/v1/oauth/authorize/";
+ private static final String REQUEST_TOKEN_URL = "https://www.readability.com/api/rest/v1/oauth/request_token/";
+ private static final String ACCESS_TOKEN_URL = "https://www.readability.com/api/rest/v1/oauth/access_token/";
+
+ @Override
+ public String getRequestTokenEndpoint()
+ {
+ return REQUEST_TOKEN_URL;
+ }
+
+ @Override
+ public String getAccessTokenEndpoint()
+ {
+ return ACCESS_TOKEN_URL;
+ }
+
+ @Override
+ public String getAuthorizationUrl(Token requestToken)
+ {
+ return String.format(AUTHORIZE_URL, requestToken.getToken());
+ }
+}
Something went wrong with that request. Please try again.