Skip to content

Instantly share code, notes, and snippets.

@guilhermesilveira
Created February 28, 2011 13:46
Show Gist options
  • Save guilhermesilveira/847327 to your computer and use it in GitHub Desktop.
Save guilhermesilveira/847327 to your computer and use it in GitHub Desktop.
articles {
id "http://example.com/json"
title "Feed"
updated time
author {
name "John Doe"
email "joedoe@example.com"
}
author {
name "Foo Bar"
email "foobar@example.com"
}
link("next" , url_for(@some_articles))
link("previous", "http://a.link.com/previous")
each(@some_articles) do |article|
id "uri:#{article[:id]}"
title article[:title]
updated article[:updated]
link("image", "http://example.com/image/1")
link("image", "http://example.com/image/2", :type => "application/json")
end
}
article {
id "uri:#{@article[:id]}"
title @article[:title]
updated @article[:updated]
link("image", "http://example.com/image/1")
link("image", "http://example.com/image/2", :type => "application/json")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment