mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Fixed class descriptions for models
Improves consistency and matches what we do for contracts, endpoints, etc. Milestone: patch
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models API response.
|
||||
# Models the data of the API response.
|
||||
CurrentScreen = Data.define :refresh_rate, :image_url, :filename do
|
||||
def self.for(attributes) = new(**attributes)
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models data for API display responses.
|
||||
# Models the data of the API response.
|
||||
Display = Struct.new(
|
||||
:filename,
|
||||
:firmware_url,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models API response.
|
||||
# Models the data of the API response.
|
||||
Firmware = Data.define :url, :version do
|
||||
def self.for(attributes) = new(**attributes)
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# IPs API response.
|
||||
# Models the data of the API response.
|
||||
IPAddress = Data.define :version_4, :version_6 do
|
||||
def self.for attributes
|
||||
new(**attributes.transform_keys(ipv4: :version_4, ipv6: :version_6))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models data for API display responses.
|
||||
# Models the data of the API response.
|
||||
Model = Struct.new(
|
||||
:name,
|
||||
:label,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# IPs API response.
|
||||
# Models the data of the API response.
|
||||
Palette = Data.define :id, :name, :grays, :colors, :framework_class do
|
||||
def self.for(attributes) = new(**attributes)
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models API response.
|
||||
# Models the data of the API response.
|
||||
Setup = Data.define :api_key, :friendly_id, :image_url, :message do
|
||||
def self.for(attributes) = new(**attributes)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user