Created
May 22, 2009 05:58
-
-
Save jayzes/115958 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nokogiri::XML(resource["4165/stories?limit=10&filter=state%3Astarted"].get).xpath('//story').collect do |story| | |
{ | |
:name => story.at('name'), | |
:owner => story.at('owned_by'), | |
:created_at => story.at('created_at'), | |
:description => story.at('description'), | |
:url => story.at('url'), | |
:type => story.at('story_type') | |
:notes => story.at('notes').collect { |note| { :note => { :text => note.at('text').content, :created_at => note.at('noted_at').content } } } unless story.at('notes').nil? | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment