ruby client for hook.
# Gemfilegem'hook-client'Basic usage:
require'hook-client'client=Hook::Client(:app_id=>1,:key=>"something",:endpoint=>"https://dl-api.heroku.com")client.collection(:posts).create(:title=>"Getting Started",:description=>"Getting started with dl-api-ruby.")putsclient.collection(:posts).where(:title=>"Getting Started").countFor more examples, please see our tests.
Set-up with your credentials:
Hook::Client.configure(:app_id=>1,:key=>"1f143fde82d14643099ae45e6c98c8e1",:endpoint=>"https://dl-api.heroku.com")Define your models:
classPostincludeHook::Modelfield:titlefield:descriptionvalidates_presence_of:titleendHook::Model's uses almost the same syntax as ActiveRecord, which you're already familiar with.
You will be able to use any ActiveModel goodies, such as validation, serialization and dirty methods.
MIT