Sunstone is an ActiveRecord adapter for quering APIs conforming to Standard API.
Add sunstone
to your Gemfile:
gem 'sunstone'
Update config/database.yml
"
development:
adapter: sunstone
url: https://mystanda.rd/api
api_key: ..optional..
user_agent: ..optional..
Initialize the connection on ActiveRecord::Base
or your abstract model (ApplicationRecord
for example)
ActiveRecord::Base.establish_connection(
adapter: 'sunstone',
url: 'https://mystanda.rd/api'
)
Mention fitler / etc...
Make cookie_store
and optional
stream building model instances with wankel