Configure the client
API keys belong to a project, so methods like
collections.list need no project ID, and collections can be named by ID or slug.
Results
The API’s resources come back asNohead::NoheadObjects:
- Read fields with methods (
record.data) or[](record[:data],record["data"]), at any depth. Fields named like Ruby’s own methods (method,hash) need[]. - Timestamps (
created_at,purge_after, a scheduled change’sat) areTimes. A record’s field values indatastay as they come. - Unknown fields are kept, because the API adds fields and values without notice.
to_hgives the raw Hash.
Images
Nohead::Images.url builds an image URL with resizing options: see Images.
Methods
Every method follows a resource of the API:records, drafts, collections, fields, migrations, assets, webhooks, search, audit_events and more. Each endpoint in the API reference shows its call in Ruby, and the README lists them by resource.
Source
The SDK is open source, under the MIT license. Report issues and follow releases on GitHub:nohead-io/nohead-ruby
Loading repository data...