@rest.command
  def refresh_access_token(self):
    parameters = {'client_id': self.CLIENT_ID,
                  'auth_code': self.auth_code,
                  'client_secret': self.CLIENT_SECRET,
                  'grant_type': 'authorization_code'}
    url = self.ACCESS_TOKEN_URL % parameters
    data = self._get_refresh_data()
    logging.info('url: %s, data: %s', url, data)

    try:
      # empty data to trigger a post
      req = urllib2.Request(url, data)
      req.add_header('Content-Type', 'application/x-www-form-urlencoded')
      result = urllib2.urlopen(req)
      result = json.load(result)
      logging.info('result: %s', result)
    except urllib2.HTTPError, err:
      result = json.load(err)
      logging.info(result)
      raise err

    self.access_token = result['access_token']
    self.expires = int(time.time() + result['expires_in'])
    self.refresh_token = result.get('refresh_token', None)
Changes the node definition to use for an existing node. An example of
dataset/ETHPy150Open tomwilkie/awesomation/src/appengine/account.py/Account.refresh_access_token--crossover with--dataset/ETHPy150Open UniversalDevicesInc/Polyglot/polyglot/nodeserver_api.py/PolyglotConnector.change_node