def api_call(user, path, data=None, beta=False):
from .models import OAuthConnection
api_url = BETA_API_URL if beta else WL_API_URL
def api_call(user, path, data=None, beta=False):
from .models import OAuthConnection
api_url = BETA_API_URL if beta else WL_API_URL
if not conn.access:
raise NotAuthorizedError("No WL authorization for user %s." % user)
token = oauth2.Token(conn.token, conn.token_secret)
if not conn.access:
raise NotAuthorizedError("No WL authorization for user %s." % user)
token = oauth2.Token(conn.token, conn.token_secret)