Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Fat Secret Api to Scribe #367

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions 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());
}

}