def __init__(<EOL>self,<EOL>path=DEFAULT_API_PREPATH,<EOL>refresh_token=None,<EOL>api_endpoint=None,<EOL>):
super(RightScale, self).__init__({}, path)<EOL>self.auth_token = None<EOL>rc_creds = get_rc_creds()<EOL>if api_endpoint is None:<EOL><INDENT>api_endpoint = rc_creds[<NUM_LIT:0>]<EOL><DEDENT>if not api_endpoint:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.api_endpoint = api_endpoint<EOL>if refresh_token is None:<EOL><INDENT>refresh_token = rc_creds[<NUM_LIT:1>]<EOL><DEDENT>if not refresh_token:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.client = HTTPClient(<EOL>api_endpoint,<EOL>{'<STR_LIT>': '<STR_LIT>'},<EOL>OAUTH2_RES_PATH,<EOL>refresh_token,<EOL>)<EOL>
Creates and configures the API object.
:param str refresh_token: The refresh token provided by Rightscale when
    API access is enabled.
:param api_endpoint: The rightscale subdomain to be hit with API
    requests.
:param str path: The path portion of the URL.
    E.g. ``/api``.