Skip to content

Instantly share code, notes, and snippets.

@jayzes
Created May 22, 2009 05:58
Show Gist options
  • Save jayzes/115958 to your computer and use it in GitHub Desktop.
Save jayzes/115958 to your computer and use it in GitHub Desktop.
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