def modify_chat_room(room_id, name, desc, maxusers = nil) 
      token =    self.auth_token()
      body  =    {name: name, description: desc} 
      body.merge!({maxusers: maxusers}) unless maxusers.nil?

      result = HTTParty.put("#{@head_url}/chatrooms/#{room_id}", 
          :body => body.to_json,
          :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )

      if result.response.code.to_i == 200
        return result["data"] 
      else
        nil
      end 
    end
def modify_chat_room(room_id, name, desc, maxusers = nil) 
      token =    self.auth_token()
      body  =    {name: name, description: desc} 
      body.merge!({maxusers: maxusers}) unless maxusers.nil?

      result = HTTParty.put("#{@head_url}/chatrooms/#{room_id}", 
          :body => body.to_json,
          :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )

      if result.response.code.to_i == 200
        return result["data"] 
      else
        nil
      end 
    end
修改聊天室