PUT /mnoe/jpi/v1/admin/cloud_apps/:id
328278
def update
      @cloud_app = MnoEnterprise::App.find params[:id]

      if @cloud_app.update(cloud_app_params)
        render :show, status: :ok
      else
        render json: @cloud_app.errors, status: :unprocessable_entity
      end
    end
274711
def set(self, id, value):
        
        session = json_dumps(value)
        self.collection.replace_one(
            {
                "wechat_id": id
            }, {
                "wechat_id": id,
                "session": session
            },
            upsert=True
        )
954555
function changeId(content, filePath, name, idSep) {
    if (idSep === void 0) { idSep = '_'; }
    var idReg = /svgicon(\w+)/g;
    content = content.replace(idReg, function (match, elId) {
        return "svgicon" + idSep + filePath.replace(/[\\\/]/g, idSep) + name + idSep + elId;
    });
    return content;
}
1019016
def __set_version_id(self):
        

        version_id = self.client.factory.create('VersionId')
        version_id.ServiceId = self._version_info['service_id']
        version_id.Major = self._version_info['major']
        version_id.Intermediate = self._version_info['intermediate']
        version_id.Minor = self._version_info['minor']
        self.logger.debug(version_id)
        self.VersionId = version_id
953636
def app_id(iface=''):
    
    if iface:
        return uniqid(iface)

    if platform.system() == 'Darwin':
        _ava_start = ['en']
    elif platform.system() == 'Linux':
        _ava_start = ['eth', 'wla']
    else:
        return None

    nics = psutil.net_if_addrs()
    _ifces = list(nics.keys())
    _ifces.sort()

    for _ in _ifces:
        if _[:len(_ava_start[0])] in _ava_start:
            return uniqid(_)
190352
def rename(id, name)
      wf_apitoken_id?(id)
      api.put(id, { tokenID: id, tokenName: name }, 'application/json')
    end
1293205
def commit(self, id, impreq): # pylint: disable=invalid-name,redefined-builtin
        
        schema = RequestSchema()
        json = self.service.encode(schema, impreq)

        schema = RequestSchema()
        resp = self.service.post(self.base+str(id)+'/', json=json)
        return self.service.decode(schema, resp)
1222140
def MakeGoogleUniqueID(cloud_instance):
  """"""
  if not (cloud_instance.zone and cloud_instance.project_id and
          cloud_instance.instance_id):
    raise ValueError("Bad zone/project_id/id: '%s/%s/%s'" %
                     (cloud_instance.zone, cloud_instance.project_id,
                      cloud_instance.instance_id))
  return "/".join([
      cloud_instance.zone.split("/")[-1], cloud_instance.project_id,
      cloud_instance.instance_id
  ])
1355470
def update(self, id, **kwargs):
        

        response = self.ghost.execute_put('%s/%s/' % (self._type_name, id), json={
            self._type_name: [
                kwargs
            ]
        })

        return self._model_type(response.get(self._type_name)[0])
1301745
def set_role_id(name, role_id)
      options = { role_id: role_id }
      client.post("/v1/auth/approle/role/#{encode_path(name)}/role-id", JSON.fast_generate(options))
      return true
    end
637396
def put(self, dash_id=0):
        
        data = request.get_json()
        updated = self._update_dash(dash_id, data)
        return build_response(dict(data=updated, code=200))
682853
def update_iap_family!(app_id: nil, family_id: nil, data: nil)
      with_tunes_retry do
        r = request(:put) do |req|
          req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/")
          req.body = data.to_json
          req.headers['Content-Type'] = 'application/json'
        end
        handle_itc_response(r.body)
      end
    end
1349622
def update(self, id):
        """"""
        # url('DataStores', id=ID)
        content = request.environ['wsgi.input'].read(int(request.environ['CONTENT_LENGTH']))
        content = content.decode('utf8')
        content = simplejson.loads(content)        
        result = meta.Session.query(DataStore).get(id)
        result.name = content['name']
        result.type = content['type']
        result.ogrstring = content['ogrstring']
        meta.Session.commit()
        response.status = 201
1101380
def stop(cls, app_id):
        
        conn = Qubole.agent()
        return conn.put(cls.element_path(app_id) + "/stop")
917699
def set(self, id, value):
        
        value = json_dumps(value)
        self.conn.cursor().execute(
            "INSERT INTO WeRoBot (id, value) VALUES (%s,%s) \
                ON DUPLICATE KEY UPDATE value=%s", (
                id,
                value,
                value,
            )
        )
        self.conn.commit()
1035406
def app_public_key(self, id, **kwargs):
        ""
        api_path = "/api/v2/apps/{id}/public_key.pem"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1279626
def delete(cls, app_id):
        
        conn = Qubole.agent()
        return conn.delete(cls.element_path(app_id))