Want to improve this question? Update the question so it can be answered 开发者_运维问答with facts and citations by editing this post.
Closed 2 years ago.
Improve this questionIm looking to be pointed in the right direction.
My site that i'm testign this on has a SHOP API which uses PHP calls. I have a bunch of item IDs that I want to test, about 100. Doign this manually is a bit tedious.
I'm looking for a way to use Ruby to:
- Read a row within an excel file for an itemID.
- Insert that into a URL to make the PHP API call for this transaction.
- Get the results which are returned by xml; get the sucess string and insert pass/fail into the Excel.
- Repeat with next item on the Excel sheet.
Again, I'm not looking for example strings at this moment. I'm just looking to be pointed towards the right rubygems to use for this so that I can figure it out myself.
For Excel export: http://roo.rubyforge.org/
API Calls:
If you're using a REST APi: https://github.com/archiloque/rest-client
Otherwise, raw use of the Net/Http Ruby native lib would do the trick.
Read the retunred xml: https://github.com/jnunemaker/crack or http://nokogiri.org/
精彩评论