mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Added current screen response contract
Necessary to validate the current screen API response.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "dry/schema"
|
||||
|
||||
module TRMNL
|
||||
module API
|
||||
module Contracts
|
||||
# Validates API response.
|
||||
CurrentScreen = Dry::Schema.JSON do
|
||||
required(:refresh_rate).filled :integer
|
||||
required(:image_url).filled :string
|
||||
required(:filename).filled :string
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user