This gem provides a Ruby client for the Grist API.
Add this line to your application's Gemfile:
gem 'grist'And install the gem:
$ bundle installSee examples/main.rb for some examples, here is how to use them:
- First example will create 1 Workspace, with 2 Documents, with 3 tables into document 'demo'. how to use it
$ GRIST_API_KEY=<GRIST_API_KEY> GRIST_API_URL=http://localhost:8484/api bundle exec examples/main.r-
GRIST_API_URLbase url must contain/api -
Second example will update records
GRIST_ORG_NAME=<ORGANIZATION_NAME> GRIST_API_KEY=<GRIST_API_KEY> GRIST_API_URL=http://localhost:8484/api bundle exec examples/update.rbORGANIZATION_NAMEis case-sensitive
- Start a Grist instance locally
$ docker compose up -dThen start the ruby console
$ GRIST_API_KEY=<GRIST_API_KEY> GRIST_API_URL=http://localhost:8484/api bundle exec bin/console
- GRIST_API_KEY can be found directly into your account at : http://localhost:8484/o/docs/account
You can now interact with Grist, example : $ Grist::Type::Organization.all
To install this gem onto your local machine, run bundle exec rake install.
To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/grist-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Grist::Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.