59 Commits
Author SHA1 Message Date
Brooke Kuhlmann 616c11b9a4 Refactored contracts as schemas
Necessary to properly namespace these objects. This will also allow for contracts in the future if ever needed since contracts can be built upon schemas.

Milestone: patch
2026-04-01 13:43:49 -06:00
Brooke Kuhlmann 65b422b335 Added Model API support for CSS density class
Necessary to pick up recent changes to the API.

Milestone: minor
2026-04-01 13:43:49 -06:00
Brooke Kuhlmann 635c252ec2 Fixed model palette IDs as names
These are not IDs but names so this corrects the mistake that the API makes including providing a safe default (i.e. empty array) when the names are missing.

Milestone: minor
2026-03-18 12:06:39 -06:00
Brooke Kuhlmann 39a753f215 Added palette model gray and color defaults
Necessary to provide typed defaults when attributes are missing. This is especially important when the API answers `nil` values since the API doesn't provide safe defaults.

Milestone: minor
2026-03-18 12:02:50 -06:00
Brooke Kuhlmann aeb68b32b3 Fixed palette model to use name and label attributes
Use of `id` (a.k.a. name) and `name` (a.k.a. label) was confusing and not an accurate representation of what these attributes are. This corrects the API design mistakes by having the model transform these keys appropriately.

Milestone: minor
2026-03-18 12:02:19 -06:00
Brooke Kuhlmann 047c4d1c94 Added empty recipe
Necessary to build an empty recipe (handy when needing to leverage the Null Object Pattern).

Milestone: minor
2026-02-28 13:55:57 -07:00
Brooke Kuhlmann a92a73a376 Added display firmware version
Necessary to supply the firmware version so the firmware can ignore/reject firmware updates that are of the same version as currently used.

Milestone: minor
2026-01-26 10:38:00 -07:00
Brooke Kuhlmann cb8baf4da6 Updated to using new TRMNL domain name
Necessary to use the new domain and remove usage of `usetrmnl` altogether.

Milestone: minor
2026-01-26 10:29:30 -07:00
Brooke Kuhlmann 97bf0e3c30 Updated recipe model to distinquish between data and meta information
Necessary to prevent the API design from infecting this implementation by clarifying the difference between data and metadata information (like how a basic JSON Data API response should be structured).

Milestone: minor
2026-01-22 15:19:53 -07:00
Brooke Kuhlmann 9cd951f908 Fixed recipe entry model to be data model
Necessary to add clarity to what this model represents as `Entry` was slightly confusing, and now that there is no conflict with native `Data` objects, we can use `Data` for the model name.

Milestone: minor
2026-01-22 15:19:06 -07:00
Brooke Kuhlmann f59688fee5 Added recipe meta model
Necessary to handle API response metadata so we can have distinct models for data and metadata.

RuboCop has been updated to ignore the parameters because RuboCop still doesn't have the ability to distinguish between whole value objects and standard objects (and we need safe defaults in this case).

Milestone: minor
2026-01-22 15:18:46 -07:00
Brooke Kuhlmann cbe2478cdb Updated client to inject endpoints and dynamically build instances
Necessary to ensure each endpoint is properly configured with settings unique to the client instance instead of sharing global settings. This cropped up due to needing to deal with multiple TRMNL API server routes when they should be a single route.

Milestone: minor
2026-01-15 09:18:34 -07:00
Brooke Kuhlmann 7ea4e06caa Added recipe endpoint
Necessary to perform API requests and acquire models for further processing. This also wires up the client and exposes the endpoint for immediate use.

Milestone: minor
2026-01-15 09:18:34 -07:00
Brooke Kuhlmann d0d515a948 Added recipe model
Necessary to model the data from the Recipes API. This leverages the `Entry` model which encapsulates the `data` attribute while the other keys are pagination related.

Milestone: minor
2026-01-15 09:18:34 -07:00
Brooke Kuhlmann d4209e5f01 Added recipe author model
Necessary to model a recipe author. A `Struct` is used because some keys are optional. This injects the `LocaleReducer` in order to convert all description locales to a hash for quick lookup rather than use the redundant keys provided by the API. Will soon be used by the recipe model (soon to be added).

Milestone: minor
2026-01-15 09:17:29 -07:00
Brooke Kuhlmann 8afdadbe57 Added locale reducer
Necessary to provide a reusable function to process locales by dealing with the unnecessary duplication of locale key prefixes in the API responses. This will soon be used by the models.

Milestone: minor
2026-01-15 09:16:22 -07:00
Brooke Kuhlmann 21e2a6e625 Added HTTP request error handling to requester
Necessary to account for bad requests. This also removes the private attribute accessors since they are automatically made available via Infusible.

Milestone: minor
2026-01-14 17:22:01 -07:00
Brooke Kuhlmann ead9459b80 Updated to Ruby 4.0.1
link:https://www.ruby-lang.org/en/news/2026/01/13/ruby-4-0-1-released/[Details].

Milestone: patch
2026-01-13 08:08:32 -07:00
Brooke Kuhlmann a46f4c3ec4 Updated gem dependencies
Necessary to leverage gems that are on Ruby 4.0.0 and higher. Further details can be found here:

* link:https://alchemists.io/projects[Alchemists]
* link:https://dry-rb.org[Dry RB]

The biggest change is leveraging the new RSpec helper provided by link:https://alchemists.io/projects/inspectable[Inspectable].

Milestone: minor
2026-01-02 10:03:03 -07:00
Brooke Kuhlmann 1cc2aeadc2 Added palette endpoint
Necessary to request and process Palettes API response.

Milestone: minor
2025-12-11 14:53:55 -07:00
Brooke Kuhlmann c200ae5491 Added palette model
Necessary to build a record out of the API response.

Milestone: minor
2025-12-11 14:53:55 -07:00
Brooke Kuhlmann eca4ae4f54 Added IP addresses endpoint
Necessary to request IP address data.

As addressed in the previous contract and model commits, RuboCop is updated to ignore the IP addresses in the specs since this can't be avoided.

Milestone: minor
2025-12-11 14:53:55 -07:00
Brooke Kuhlmann f54458f18f Added IP address model
Necessary to model the response.

RuboCop is updated to ignore the variable name issues since this stems from the API design. The model translates the keys to prevent this design flaw from permeating further downstream at least.

Milestone: minor
2025-12-11 14:53:55 -07:00
Brooke Kuhlmann ef400115e2 Added categories endpoint
Necessary to provide access to category data.

Milestone: minor
2025-12-11 14:53:55 -07:00
Brooke Kuhlmann 5cd685c992 Fixed RSpec inspectable endpoint shared example to only check contract
Necessary to only look for the contract since that's all we care about at the moment. This helps when endpoints don't have models.

Milestone: patch
2025-12-11 14:53:54 -07:00