199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
# File 'lib/amee/data_item.rb', line 199
def self.create_batch_without_category(connection, category_path, items, options = {})
if connection.format == :json
options.merge! :profileItems => items
post_data = options.to_json
else
options.merge!({:DataItems => items})
post_data = options.to_xml(:root => "DataCategory", :skip_types => true, :skip_nil => true)
end
response = connection.raw_post(category_path, post_data).body
unless response.empty?
return AMEE::Data::Category.parse(connection, response)
else
return true
end
end
|