Implements the Update device Portals API.

            This function is extremely dangerous. The portal object
            you pass in will completely overwrite the portal.
            
            http://docs.exosite.com/portals/#update-portal
776975
def update_portal(self, portal_obj):
        
        headers = {
                'User-Agent': self.user_agent(),
        }
        headers.update(self.headers())

        r = requests.put(   self.portals_url()+'/portals/'+self.portal_id(), 
                            data=json.dumps(portal_obj),
                            headers=headers,
                            auth=self.auth())
        if HTTP_STATUS.OK == r.status_code:
            return r.json()
        else:
            print("update_portal: Something went wrong: <{0}>: {1}".format(
                        r.status_code, r.reason))
            r.raise_for_status()
852010
public static base_response update(nitro_service client, vridparam resource) throws Exception {
		vridparam updateresource = new vridparam();
		updateresource.sendtomaster = resource.sendtomaster;
		return updateresource.update_resource(client);
	}
783679
public static device_profile update(nitro_service client, device_profile resource) throws Exception
	{
		resource.validate("modify");
		return ((device_profile[]) resource.update_resource(client))[0];
	}
289082
def _update(self, uri, body, **kwargs):
        
        self.run_hooks("modify_body_for_update", body, **kwargs)
        resp, resp_body = self.api.method_put(uri, body=body)
        return resp_body
150515
def update(self, password=values.unset):
        
        return self._proxy.update(password=password, )
1238161
def update_state(self):
        
        response = self.api_interface.get_device_state(self, type_override="button")
        return self._update_state_from_response(response)
7227
def update(self, volume, display_name=None, display_description=None):
        
        uri = "/%s/%s" % (self.uri_base, utils.get_id(volume))
        param_dict = {}
        if display_name:
            param_dict["display_name"] = display_name
        if display_description:
            param_dict["display_description"] = display_description
        if not param_dict:
            # Nothing to do!
            return
        body = {"volume": param_dict}
        resp, resp_body = self.api.method_put(uri, body=body)
965956
public ApiApp updateApiApp(ApiApp app) throws HelloSignException {
        if (!app.hasClientId()) {
            throw new HelloSignException("Cannot update an ApiApp without a client ID. Create one first!");
        }
        String url = BASE_URI + API_APP_URI + "/" + app.getClientId();
        return new ApiApp(httpClient.withAuth(auth).withPostFields(app.getPostFields()).post(url).asJson());
    }
556102
def update(self):
        
        params = {}
        return self.send(
            url=self._base_url + 'update',
            method='POST',
            json=params
        )
1264212
@SuppressLint("CommitPrefEdits")
    String forceUpdateDeviceId(String id) {
        getConfigLogger().verbose(this.config.getAccountId(),"Force updating the device ID to " + id);
        synchronized (deviceIDLock) {
            StorageHelper.putString(context, getDeviceIdStorageKey(), id);
        }
        return id;
    }
408711
public DeviceTokenEnvelope updateDeviceToken(String deviceId) throws ApiException {
        ApiResponse<DeviceTokenEnvelope> resp = updateDeviceTokenWithHttpInfo(deviceId);
        return resp.getData();
    }
1023026
def update(self, vrfs):
        

        data = {'vrfs': vrfs}
        vrfs_ids = [str(vrf.get('id')) for vrf in vrfs]

        return super(ApiVrf, self).put('api/v3/vrf/%s/' %
                                       ';'.join(vrfs_ids), data)
800118
def update(self, interfaces=None):
        

        data = {'interfaces': interfaces}

        return super(ApiInterfaceRequest, self).put('api/v3/interface/', data)
839165
def update(self, retry=2) -> None:
        """"""
        try:
            _LOGGER.debug("Updating device state.")
            key = ON_KEY if not self._flip_on_off else OFF_KEY
            self.state = self._device.readCharacteristic(HANDLE) == key
        except (bluepy.btle.BTLEException, AttributeError):
            if retry < 1 or not self._connect():
                self.available = False
                _LOGGER.error("Failed to update device state.", exc_info=True)
                return None
            return self.update(retry-1)
        self.available = True
        return None
1218725
def update
      

      @client.redirect_urls << client_params[:add_redirect_url] if client_params[:add_redirect_url]
      
      @client.app_ids << BSON::ObjectId.new.to_s if client_params[:add_app_id]
      
      
      @client.versioned_update({"redirect_urls" => 1, "app_ids" => 1})

      if @client.op_success?
        render "show"
      else
        render "edit"
      end
      
    end
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
1186579
public void updateStatus() {
        Optional<Activity> activity = api.getActivity();
        ObjectNode updateStatus = JsonNodeFactory.instance.objectNode()
                .put("op", GatewayOpcode.STATUS_UPDATE.getCode());
        ObjectNode data = updateStatus.putObject("d")
                .put("status", api.getStatus().getStatusString())
                .put("afk", false)
                .putNull("since");
        ObjectNode activityJson = data.putObject("game");
        activityJson.put("name", activity.isPresent() ? activity.get().getName() : null);
        activityJson.put("type", activity.map(g -> g.getType().getId()).orElse(0));
        activity.ifPresent(g -> g.getStreamingUrl().ifPresent(url -> activityJson.put("url", url)));
        logger.debug("Updating status (content: {})", updateStatus);
        websocket.get().sendText(updateStatus.toString());
    }