Sunday, 25 August 2013

How do I handle, parse, a colon in the url with httparty and json

How do I handle, parse, a colon in the url with httparty and json

I'm trying to parse the Mochi Media API on my site. Unfortunately, they
make use of colons in their API URLs....
http://feedmonger.mochimedia.com/feeds/query/?q=(recommendation:>=0) and
category:action&partner_id=XXXX
The question is, using httparty, how do I parse that url given that the
:query/options hash will automatically convert to a standard query string:
get('/myNewApiUrl', :query => {:key => value}) |
http://base/myNewApiUrl?key=value&key2=value2
I need something to handle this:
get('/myNewApiUrl', :query => {:key => value}) |
http://base/myNewApiUrl?key:value&key2=value2
Can anyone help me out... just about ready to bang my head against a wall. :/

No comments:

Post a Comment