package org.scribe.builder.api;

import org.scribe.model.Token;
import org.scribe.model.Verb;

public class BistriApi
    extends DefaultApi10a
{
    private static final String AUTHORIZATION_URL = "http://localhost:8080/oauth/authorize?oauth_token=%s";

    @Override
    public String getRequestTokenEndpoint()
    {
        return "http://localhost:8080/oauth/request_token";
    }

    @Override
    public String getAccessTokenEndpoint()
    {
        return "http://localhost:8080/oauth/access_token";
    }

    @Override
    public Verb getAccessTokenVerb()
    {
        return Verb.GET;
    }

    @Override
    public Verb getRequestTokenVerb()
    {
        return Verb.GET;
    }

    @Override
    public String getAuthorizationUrl( Token requestToken )
    {
        return String.format( AUTHORIZATION_URL, requestToken.getToken() );
    }
}

@@ -48,49 +48,193 @@
 ibe.
-model.Token;%0Aimport org.scribe.model.Verb
+extractors.AccessTokenExtractor;%0Aimport org.scribe.extractors.JsonTokenExtractor;%0Aimport org.scribe.model.OAuthConfig;%0Aimport org.scribe.model.Verb;%0Aimport org.scribe.utils.OAuthEncoder
 ;%0A%0Ap
@@ -281,11 +281,10 @@
 tApi
-10a
+20
 %0A%7B%0A 
@@ -333,16 +333,24 @@
 ON_URL =
+%0A       
  %22http:/
@@ -346,38 +346,38 @@
     %22http://
-localhost:8080
+dev.bistri.com
 /oauth/autho
@@ -385,19 +385,52 @@
 ize?
-oauth_token
+response_type=code&client_id=%25s&redirect_uri
 =%25s%22
@@ -463,31 +463,30 @@
 c String get
-Request
+Access
 TokenEndpoin
@@ -522,172 +522,275 @@
 p://
-localhost:8080/oauth/request_token%22;%0A    %7D%0A%0A    @Override%0A    public String getAccessTokenEndpoint()%0A    %7B%0A        return %22http://localhost:8080/oauth/access_token%22
+dev.bistri.com/oauth/access_token?grant_type=authorization_code%22;%0A    %7D%0A%0A    @Override%0A    public String getAuthorizationUrl( OAuthConfig config )%0A    %7B%0A        return String.format( AUTHORIZATION_URL, config.getApiKey(), OAuthEncoder.encode( config.getCallback() ) )
 ;%0A  
@@ -863,34 +863,35 @@
     return Verb.
-GE
+POS
 T;%0A    %7D%0A%0A    @O
@@ -913,32 +913,52 @@
 lic 
-Verb getRequest
+AccessTokenExtractor getAccess
 Token
-Verb
+Extractor
 ()%0A 
@@ -981,16 +981,32 @@
 urn 
-Verb.GET
+new JsonTokenExtractor()
 ;%0A  
@@ -1049,127 +1049,72 @@
  get
-AuthorizationUrl( Token requestToken )%0A    %7B%0A        return String.format( AUTHORIZATION_URL, requestToken.getToken() )
+RefreshTokenParameterName()%0A    %7B%0A        return %22refresh_token%22
 ;%0A  

Update BistriApi