Adding missing commit
This commit is contained in:
1 parent
90081a572c
commit
129337d4d4
162 files changed
+1357
-4
No files matched your search
@@ -2,20 +2,20 @@ package org.scribe.builder.api;
|
||||
|
||||
import org.scribe.model.*;
|
||||
|
||||
public class FreelancerAPI extends DefaultApi10a
|
||||
public class FreelancerApi extends DefaultApi10a
|
||||
{
|
||||
private static final String AUTHORIZATION_URL = "http://www.sandbox.freelancer.com/users/api-token/auth.php?oauth_token=%s";
|
||||
private static final String AUTHORIZATION_URL = "http://www.freelancer.com/users/api-token/auth.php?oauth_token=%s";
|
||||
|
||||
@Override
|
||||
public String getAccessTokenEndpoint()
|
||||
{
|
||||
return "http://api.sandbox.freelancer.com/RequestAccessToken/requestAccessToken.xml?";
|
||||
return "http://api.freelancer.com/RequestAccessToken/requestAccessToken.xml?";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRequestTokenEndpoint()
|
||||
{
|
||||
return "http://api.sandbox.freelancer.com/RequestRequestToken/requestRequestToken.xml";
|
||||
return "http://api.freelancer.com/RequestRequestToken/requestRequestToken.xml";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,4 +35,27 @@ public class FreelancerAPI extends DefaultApi10a
|
||||
{
|
||||
return String.format(AUTHORIZATION_URL, requestToken.getToken());
|
||||
}
|
||||
|
||||
public static class Sandbox extends FreelancerApi
|
||||
{
|
||||
private static final String SANDBOX_AUTHORIZATION_URL = "http://www.sandbox.freelancer.com/users/api-token/auth.php";
|
||||
|
||||
@Override
|
||||
public String getRequestTokenEndpoint()
|
||||
{
|
||||
return "http://api.sandbox.freelancer.com/RequestRequestToken/requestRequestToken.xml";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAccessTokenEndpoint()
|
||||
{
|
||||
return "http://api.sandbox.freelancer.com/RequestAccessToken/requestAccessToken.xml?";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthorizationUrl(Token requestToken)
|
||||
{
|
||||
return String.format(SANDBOX_AUTHORIZATION_URL + "?oauth_token=%s", requestToken.getToken());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user