diff --git a/lib/trmnl/api/contracts/current_screen.rb b/lib/trmnl/api/contracts/current_screen.rb new file mode 100644 index 0000000..f2fda7b --- /dev/null +++ b/lib/trmnl/api/contracts/current_screen.rb @@ -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