Added current screen response contract

Necessary to validate the current screen API response.
This commit is contained in:
Brooke Kuhlmann
2025-04-22 14:24:32 -06:00
parent cfd9f6d1f6
commit d772aaf7d6
+16
View File
@@ -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