lib/client/posting_client.rb in threetaps-client-1.0.9 vs lib/client/posting_client.rb in threetaps-client-1.0.10

- old
+ new

@@ -34,11 +34,14 @@ postings = [postings] unless postings.is_a? Array data = "[" data << postings.collect{|posting| posting.to_json}.join(',') data << "]" params = "postings=#{data}" + p params response = execute_post("/posting/create", params) + p response.inspect + p decode(response) CreateResponse.from_array(decode(response)) end # Method +update_posting+ updates a single posting and multiple postings on 3taps. # @@ -50,10 +53,10 @@ # client.update_posting(posting) #=> Array with single UpdateResponse object # def update_posting(postings) postings = [postings] unless postings.is_a? Array data = "[" - data << postings.collect{|posting| posting.to_json_for_update.gsub("%22","")}.join(',') + data << postings.collect{|posting| posting.to_json_for_update}.join(',') data << "]" params = "data=#{data}" response = execute_post("posting/update", params) UpdateResponse.from_hash(decode(response)) end