Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added the Fat Secret Api to Scribe #367

Closed
wants to merge 1 commit into from

2 participants

@JohnSatriano

I am using scribe to sign my OAuth requests to Fat Secret, and made the Api file while doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2013
  1. @JohnSatriano

    Added Fat Secret Api

    JohnSatriano authored
This page is out of date. Refresh to see the latest.
Showing with 44 additions and 0 deletions.
  1. +44 −0 src/main/java/org/scribe/builder/api/FatSecretApi.java
View
44 src/main/java/org/scribe/builder/api/FatSecretApi.java
@@ -0,0 +1,44 @@
+package org.scribe.builder.api;
+
+import org.scribe.model.*;
+
+/**
+ *
+ * OAuth API for Fat Secret
+ *
+ * @author John Satriano
+ * @see <a href="http://platform.fatsecret.com/api/>Fat Secret API</a>
+ *
+ */
+public class FatSecret extends DefaultApi10a {
+
+ private static final String AUTHORIZE_URL = "http://fatsecret.com/oauth/authorize?token=%s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getAccessTokenEndpoint()
+ {
+ return "http://fatsecret.com/oauth/access_token";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getRequestTokenEndpoint()
+ {
+ return "http://fatsecret.com/oauth/request_token";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getAuthorizationUrl(Token requestToken)
+ {
+ return String.format(AUTHORIZE_URL, requestToken.getToken());
+ }
+
+ }
Something went wrong with that request. Please try again.