Skip to content

paul/datapathy

Repository files navigation

datapathy

The stupid-simple ORM as an HTTP client.

Examples

class Post
  include Datapathy::Model

  # Using service discovery
  self.service_name = "AllPosts"
  # Using manual URLs. Boo.
  self.service_href = "http://example.com/posts{?author_href,q}"

  persists :title, :body, :author_href, :comments_href

  links :author
  links :comments

end

Post.href  #=> "http://example.com/posts"
Post.select { |p| p.author = author }.href
# => "http://example.com/posts?author_href=http://example.com/authors/1"

Copyright

Copyright (c) 2011 Paul Sadauskas. See LICENSE for details.

About

A stupid-simple ORM that provides the minimum neccessary api, and stays out of your way

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages