Ok, sorry, that version was crappy. This one converts the results back
to a nice ruby hash. So
far this stuff will only work with a simple name,value list. Note sure
how to handle nested data yet.
def appdata(user_id)
response = do_request "users/#{user_id}/appdata"
if (res = response['keyvaluecollection'])
hash = {}
res.each {|pair| hash[pair['key']] = pair['value']}
hash
else
{}
end
end