Class: MingleAPI::Comment
- Defined in:
- lib/mingle/mingle-api.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create ⇒ Object
212 213 214 215 216 |
# File 'lib/mingle/mingle-api.rb', line 212 def create connection.post(collection_path + '?' + encode, nil, self.class.headers).tap do |response| load_attributes_from_response(response) end end |
#encode(options = {}) ⇒ Object
218 219 220 221 222 223 224 |
# File 'lib/mingle/mingle-api.rb', line 218 def encode(={}) val=[] attributes.each_pair do |key, value| val << "comment[#{URI.escape key}]=#{URI.escape value}" rescue nil end val.join('&') end |