

def generate_client_login_request_body(email, password, service, source, account_type='HOSTED_OR_GOOGLE', captcha_token=None, captcha_response=None):
    "Creates the body of the autentication request\n\n  See http://code.google.com/apis/accounts/AuthForInstalledApps.html#Request\n  for more details.\n\n  Args:\n    email: str\n    password: str\n    service: str\n    source: str\n    account_type: str (optional) Defaul is 'HOSTED_OR_GOOGLE', other valid\n        values are 'GOOGLE' and 'HOSTED'\n    captcha_token: str (optional)\n    captcha_response: str (optional)\n\n  Returns:\n    The HTTP body to send in a request for a client login token.\n  "
    request_fields = {
        'Email': email,
        'Passwd': password,
        'accountType': account_type,
        'service': service,
        'source': source,
    }
    if (captcha_token and captcha_response):
        request_fields['logintoken'] = captcha_token
        request_fields['logincaptcha'] = captcha_response
    return urllib.urlencode(request_fields)

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py generate_client_login_request_body/original