def GenerateAuthSubRequestUrl(next, scopes, hd='default', secure=False, session=True, request_url='https://www.google.com/accounts/AuthSubRequest', include_scopes_in_next=True):
 if isinstance(scopes, list):
  scope = ' '.join(scopes)
 else:
  scope = scopes
 if include_scopes_in_next:
  if (next.find('?') > (-1)):
   next += ('&%s' % urllib.urlencode({SCOPE_URL_PARAM_NAME: scope}))
  else:
   next += ('?%s' % urllib.urlencode({SCOPE_URL_PARAM_NAME: scope}))
 return gdata.auth.GenerateAuthSubUrl(next=next, scope=scope, secure=secure, session=session, request_url=request_url, domain=hd)

def GenerateAuthSubRequestUrl ( next , scopes , hd = 'default' , secure = False , session = True , request_url = 'https://www.google.com/accounts/AuthSubRequest' , include_scopes_in_next = True ) : if isinstance ( scopes , list ) : scope = ' ' . join ( scopes ) else : scope = scopes if include_scopes_in_next : if ( next . find ( '?' ) > ( - 1 ) ) : next += ( '&%s' % urllib . urlencode ( { SCOPE_URL_PARAM_NAME : scope } ) ) else : next += ( '?%s' % urllib . urlencode ( { SCOPE_URL_PARAM_NAME : scope } ) ) return gdata . auth . GenerateAuthSubUrl ( next = next , scope = scope , secure = secure , session = session , request_url = request_url , domain = hd )
creates a url to request an authsub token to access google services .