trmnl-api 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8efedaa295b0c387a87ff3ae179bc8179e21485505de33474d1b5e00bb694e15
4
- data.tar.gz: ca6875d143b129e2b42114289a3be856e41b5581b4e7ba5286292e6829b3c940
3
+ metadata.gz: 530219db82e7ab05d49c0692ee54435723245a1a5b9ce9b5079361e111120115
4
+ data.tar.gz: 2e58c74060a26070e0b7c9fcb770c47c697a32d3646098dc719254b5c6f02a79
5
5
  SHA512:
6
- metadata.gz: d2ba42f64f6e549c6852b5326d7ef0e1a1a8356baff3010fa88e2fe7469fcc82986b3b15ade6fe9734cc1d7df36474139b8c6345733eb8bf932e900ddd04f791
7
- data.tar.gz: 0d7e7e1ade6a86c1f689ac783ba5160dd87544306e295b9befe9150c86cb26d410f15e0efa64ee867be9e2a06ef06bd82c6ff19a6502a53709da4a2f863db570
6
+ metadata.gz: e2b2bee803746c45bfee303de19eb77d9df9aca5c34d1c48331a5059f462e0a231200e3b3fb48f410dfdc37506b12c4e9f80063a412e77e46bdcf2c6529948c6
7
+ data.tar.gz: 1289944f4f523c44df6c2dc712217a756c7df5c29935168fbcea67db538e14b1808c1b596bfc46d95d636224447c86a7f936a9cdb6b5093e7ecf40408e974b60
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -137,133 +137,121 @@ client = TRMNL::API.new
137
137
  client.display token: "secret"
138
138
 
139
139
  # Success(
140
- # #<struct TRMNL::API::Models::Display
141
- # filename="plugin-4c2660-1780411821",
142
- # firmware_url="https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.5.bin",
143
- # firmware_version="1.8.5",
144
- # image_url="https://trmnl.s3.us-east-2.amazonaws.com/...",
145
- # image_url_timeout=0,
146
- # maximum_compatibility=false,
147
- # refresh_rate=1765,
148
- # reset_firmware=false,
149
- # special_function="none",
150
- # temperature_profile="default",
151
- # touchbar_mode="tap",
152
- # update_firmware=true
153
- # >
140
+ # #<data TRMNL::API::Models::Display
141
+ # filename="plugin-0ac339-1794250527",
142
+ # image_url="https://trmnl.s3.us-east-2.amazonaws.com/...",
143
+ # image_url_timeout=0,
144
+ # refresh_rate=1769,
145
+ # firmware_version="1.8.18",
146
+ # firmware_url="https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.18.bin",
147
+ # update_firmware=true,
148
+ # reset_firmware=false,
149
+ # maximum_compatibility=false,
150
+ # temperature_profile="default",
151
+ # touchbar_mode="tap",
152
+ # action=nil,
153
+ # playlist_image_names=["plugin-0ac339", "plugin-f60d70", "plugin-499f35"]
154
+ # >
154
155
  # )
155
156
  ----
156
157
 
157
- ==== Firmware Flashes
158
+ ==== Firmware
158
159
 
159
- Allows you to obtain firmware flashes. Example:
160
+ Allows you to obtain firmware versions. Example:
160
161
 
161
162
  [source,ruby]
162
163
  ----
163
164
  client = TRMNL::API.new
164
- client.firmware_flashes
165
+ client.firmware
165
166
 
166
167
  # Success(
167
- # [
168
- # #<data TRMNL::API::Models::Firmware::Flash:0x000024c0
169
- # chip_family = "ESP32-S3",
170
- # label = "TRMNL X",
171
- # name = "trmnl_x",
172
- # versions = [
173
- # #<data TRMNL::API::Models::Firmware::Version:0x00002510
174
- # label = "FW1.7.7",
175
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.7.7.bin"
176
- # >,
177
- # #<data TRMNL::API::Models::Firmware::Version:0x00002540
178
- # label = "FW1.7.9",
179
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.7.9.bin"
180
- # >,
181
- # #<data TRMNL::API::Models::Firmware::Version:0x00002570
182
- # label = "FW1.8.1",
183
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.1.bin"
184
- # >,
185
- # #<data TRMNL::API::Models::Firmware::Version:0x000025a0
186
- # label = "FW1.8.2",
187
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.2.bin"
188
- # >,
189
- # #<data TRMNL::API::Models::Firmware::Version:0x000025d0
190
- # label = "FW1.8.5",
191
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.5.bin"
192
- # >,
193
- # #<data TRMNL::API::Models::Firmware::Version:0x00002600
194
- # label = "FW1.8.6",
195
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.6.bin"
196
- # >,
197
- # #<data TRMNL::API::Models::Firmware::Version:0x00002630
198
- # label = "FW1.8.8",
199
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.8.bin"
200
- # >,
201
- # #<data TRMNL::API::Models::Firmware::Version:0x00002660
202
- # label = "FW1.8.9",
203
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.9.bin"
204
- # >,
205
- # #<data TRMNL::API::Models::Firmware::Version:0x00002690
206
- # label = "FW1.8.10",
207
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.10.bin"
208
- # >,
209
- # #<data TRMNL::API::Models::Firmware::Version:0x000026c0
210
- # label = "FW1.8.12",
211
- # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/flash/FW1.8.12.bin"
212
- # >
213
- # ]
214
- # >
215
- # ]
168
+ # [
169
+ # #<data TRMNL::API::Models::Firmware:0x00001d40
170
+ # chip_family = "ESP32-C3",
171
+ # label = "TRMNL OG (1-bit)",
172
+ # model_name = "og_png",
173
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.19.bin",
174
+ # version = "1.8.19",
175
+ # versions = [
176
+ # #<data TRMNL::API::Models::Version:0x00001db0
177
+ # label = "1.8.19",
178
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.19.bin"
179
+ # >,
180
+ # #<data TRMNL::API::Models::Version:0x00001de0
181
+ # label = "1.8.18",
182
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.18.bin"
183
+ # >,
184
+ # #<data TRMNL::API::Models::Version:0x00001e10
185
+ # label = "1.8.17",
186
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.17.bin"
187
+ # >
188
+ # >
189
+ # ]
216
190
  # )
217
191
  ----
218
192
 
219
- ==== Firmware Latest
220
-
221
- Allows you to obtain the latest stable firmware version. Example:
193
+ You can also obtain firmware by model name. Example:
222
194
 
223
195
  [source,ruby]
224
196
  ----
225
197
  client = TRMNL::API.new
226
- client.firmware_latest
198
+ client.firmware "v2"
227
199
 
228
200
  # Success(
229
- # #<data TRMNL::API::Models::Firmware::Latest
230
- # url="https://trmnl-fw.s3.us-east-2.amazonaws.com/FW1.8.12.bin",
231
- # version="1.4.8">
201
+ # #<data TRMNL::API::Models::Firmware:0x00003380
202
+ # chip_family = "ESP32-S3",
203
+ # label = "TRMNL X",
204
+ # model_name = "v2",
205
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/FW1.8.18.bin",
206
+ # version = "1.8.18",
207
+ # versions = [
208
+ # #<data TRMNL::API::Models::Version:0x000033f0
209
+ # label = "1.8.18",
210
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/FW1.8.18.bin"
211
+ # >,
212
+ # #<data TRMNL::API::Models::Version:0x00003420
213
+ # label = "1.8.17",
214
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/FW1.8.17.bin"
215
+ # >,
216
+ # #<data TRMNL::API::Models::Version:0x00003450
217
+ # label = "1.8.16",
218
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/FW1.8.16.bin"
219
+ # >
220
+ # ]
221
+ # >
232
222
  # )
233
223
  ----
234
224
 
235
- You can also tweak the result to answer current (or past) versions, specific model names, and/or both. Examples:
236
-
237
- **By Version**
238
-
239
- [source,ruby]
240
- ----
241
- client = TRMNL::API.new
242
- client.firmware_latest "1.8.0"
225
+ ==== Flashes
243
226
 
244
- # Success(
245
- # #<data TRMNL::API::Models::Firmware::Latest
246
- # url="https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/FW1.8.0.bin",
247
- # version="1.8.0">
248
- # )
249
- ----
250
-
251
- **By Model Name**
227
+ Allows you to obtain firmware flashes. Example:
252
228
 
253
229
  [source,ruby]
254
230
  ----
255
231
  client = TRMNL::API.new
256
- client.firmware_latest model_name: "trmnl_x"
232
+ client.flashes
257
233
 
258
234
  # Success(
259
- # #<data TRMNL::API::Models::Firmware::Latest
260
- # url="https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_x/FW1.8.17.bin",
261
- # version="1.8.17">
235
+ # [
236
+ # #<data TRMNL::API::Models::Flash:0x00003970
237
+ # chip_family = "ESP32-C3",
238
+ # label = "TRMNL OG (native)",
239
+ # name = "trmnl",
240
+ # versions = [
241
+ # #<data TRMNL::API::Models::Version:0x000039c0
242
+ # label = "FW1.8.19",
243
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/flash/FW1.8.19.bin"
244
+ # >,
245
+ # #<data TRMNL::API::Models::Version:0x000039f0
246
+ # label = "FW1.8.18",
247
+ # uri = "https://trmnl-fw.s3.us-east-2.amazonaws.com/trmnl_og/flash/FW1.8.18.bin"
248
+ # >
249
+ # ]
250
+ # >
251
+ # ]
262
252
  # )
263
253
  ----
264
254
 
265
- ⚠️ This isn't officially supported by the TRMNL API since the endpoint only knows how to provide the latest firmware for OG models so the above allows you to obtain what you need by dynamically formatting the URI based on version and model name. This also means if you make a typo, you might get a URI that doesn't exist since no verification happens.
266
-
267
255
  ==== IP Addresses
268
256
 
269
257
  Allows you obtain a list of public IP addresses for all TRMNL core servers because plugin poll requests will only originate from these IPs. Example:
@@ -386,6 +374,7 @@ client.models
386
374
  # "gray-4",
387
375
  # "bw"
388
376
  # ],
377
+ # default_palette_name = "gray-16"
389
378
  # rotation = 0,
390
379
  # scale_factor = 1.8,
391
380
  # width = 1872
@@ -6,15 +6,12 @@ module TRMNL
6
6
  module API
7
7
  # Provides the primary client for making API requests.
8
8
  class Client
9
- include Dependencies[:settings]
10
- include Inspectable[:endpoints]
11
-
12
9
  ENDPOINTS = {
13
10
  categories: Endpoints::Category,
14
11
  current_screen: Endpoints::CurrentScreen,
15
12
  display: Endpoints::Display,
16
- firmware_flashes: Endpoints::Firmware::Flash,
17
- firmware_latest: Endpoints::Firmware::Latest,
13
+ firmware: Endpoints::Firmware,
14
+ flashes: Endpoints::Flash,
18
15
  ip_addresses: Endpoints::IPAddress,
19
16
  log: Endpoints::Log,
20
17
  models: Endpoints::Model,
@@ -23,6 +20,9 @@ module TRMNL
23
20
  setup: Endpoints::Setup
24
21
  }.freeze
25
22
 
23
+ include Dependencies[:settings]
24
+ include Inspectable[:endpoints]
25
+
26
26
  def initialize(requester: Requester, endpoints: ENDPOINTS, **)
27
27
  super(**)
28
28
 
@@ -41,9 +41,9 @@ module TRMNL
41
41
 
42
42
  def display(**) = endpoints.fetch(__method__).call(**)
43
43
 
44
- def firmware_flashes = endpoints.fetch(__method__).call
44
+ def firmware(*) = endpoints.fetch(__method__).call(*)
45
45
 
46
- def firmware_latest(...) = endpoints.fetch(__method__).call(...)
46
+ def flashes = endpoints.fetch(__method__).call
47
47
 
48
48
  def ip_addresses = endpoints.fetch(__method__).call
49
49
 
@@ -24,13 +24,14 @@ module TRMNL
24
24
 
25
25
  namespace :schemas do
26
26
  namespace :firmware do
27
- register :flash, Schemas::Firmware::Flash
28
- register :latest, Schemas::Firmware::Latest
27
+ register :many, Schemas::Firmware::Many
28
+ register :sole, Schemas::Firmware::Sole
29
29
  end
30
30
 
31
31
  register :category, Schemas::Category
32
32
  register :current_screen, Schemas::CurrentScreen
33
33
  register :display, Schemas::Display
34
+ register :flash, Schemas::Flash
34
35
  register :ip_address, Schemas::IPAddress
35
36
  register :model, Schemas::Model
36
37
  register :palette, Schemas::Palette
@@ -39,13 +40,10 @@ module TRMNL
39
40
  end
40
41
 
41
42
  namespace :models do
42
- namespace :firmware do
43
- register :flash, Models::Firmware::Flash
44
- register :latest, Models::Firmware::Latest
45
- end
46
-
47
43
  register :current_screen, Models::CurrentScreen
48
44
  register :display, Models::Display
45
+ register :firmware, Models::Firmware
46
+ register :flash, Models::Flash
49
47
  register :ip_address, Models::IPAddress
50
48
  register :model, Models::Model
51
49
  register :palette, Models::Palette
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "inspectable"
4
+ require "pipeable"
5
+
6
+ module TRMNL
7
+ module API
8
+ module Endpoints
9
+ # Handles API request/response.
10
+ class Firmware
11
+ include TRMNL::API::Dependencies[
12
+ :requester,
13
+ many_schema: "schemas.firmware.many",
14
+ sole_schema: "schemas.firmware.sole",
15
+ model: "models.firmware"
16
+ ]
17
+
18
+ include Inspectable[many_schema: :type, sole_schema: :type]
19
+ include Pipeable
20
+
21
+ def call(model_name = nil) = model_name ? sole(model_name) : many
22
+
23
+ private
24
+
25
+ def sole model_name
26
+ pipe(
27
+ requester.get("firmware/#{model_name}"),
28
+ try(:parse, catch: JSON::ParserError),
29
+ validate(sole_schema, as: :to_h),
30
+ as(:fetch, :data),
31
+ to(model, :for)
32
+ )
33
+ end
34
+
35
+ def many
36
+ pipe(
37
+ requester.get("firmware"),
38
+ try(:parse, catch: JSON::ParserError),
39
+ validate(many_schema, as: :to_h),
40
+ as(:fetch, :data),
41
+ map { |data| model.for(**data) }
42
+ )
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "inspectable"
4
+ require "pipeable"
5
+
6
+ module TRMNL
7
+ module API
8
+ module Endpoints
9
+ # Handles API request/response.
10
+ class Flash
11
+ include TRMNL::API::Dependencies[
12
+ :requester,
13
+ schema: "schemas.flash",
14
+ model: "models.flash"
15
+ ]
16
+
17
+ include Inspectable[schema: :type]
18
+ include Pipeable
19
+
20
+ def call
21
+ pipe(
22
+ requester.get("firmware/flash"),
23
+ try(:parse, catch: JSON::ParserError),
24
+ validate(schema, as: :to_h),
25
+ as(:fetch, :data, :models),
26
+ as(:fetch, :models),
27
+ map { |attributes| model.for(**attributes) }
28
+ )
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -6,32 +6,34 @@ module TRMNL
6
6
  # Models the data of the API response.
7
7
  Display = Data.define(
8
8
  :filename,
9
- :firmware_url,
10
- :firmware_version,
11
9
  :image_url,
12
10
  :image_url_timeout,
13
- :maximum_compatibility,
14
11
  :refresh_rate,
12
+ :firmware_version,
13
+ :firmware_url,
14
+ :update_firmware,
15
15
  :reset_firmware,
16
- :special_function,
16
+ :maximum_compatibility,
17
17
  :temperature_profile,
18
18
  :touchbar_mode,
19
- :update_firmware
19
+ :action,
20
+ :playlist_image_names
20
21
  ) do
21
22
  def self.for(attributes) = new(**attributes)
22
23
 
23
24
  def initialize filename: nil,
24
- firmware_url: nil,
25
- firmware_version: nil,
26
25
  image_url: nil,
27
26
  image_url_timeout: 0,
28
- maximum_compatibility: false,
29
27
  refresh_rate: 300,
28
+ firmware_version: nil,
29
+ firmware_url: nil,
30
+ update_firmware: false,
30
31
  reset_firmware: false,
31
- special_function: "none",
32
+ maximum_compatibility: false,
32
33
  temperature_profile: "default",
33
34
  touchbar_mode: "tap",
34
- update_firmware: false
35
+ action: nil,
36
+ playlist_image_names: nil
35
37
  super
36
38
  end
37
39
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TRMNL
4
+ module API
5
+ module Models
6
+ # Models the data of the API response.
7
+ Firmware = ::Data.define :label, :model_name, :chip_family, :version, :uri, :versions do
8
+ def self.for **attributes
9
+ versions = Array(attributes.delete(:versions)).map { Version.for(**it) }
10
+
11
+ new(
12
+ **attributes.transform_keys!(model: :model_name, latest: :version, url: :uri),
13
+ versions:
14
+ )
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "core"
4
+
5
+ module TRMNL
6
+ module API
7
+ module Models
8
+ # Models the data of the API response.
9
+ Flash = Data.define :name, :label, :chip_family, :versions do
10
+ def self.for **attributes
11
+ versions = Array(attributes.delete(:versions)).map { Version.for(**it) }
12
+ new(**attributes.transform_keys!(keyname: :name, chipFamily: :chip_family), versions:)
13
+ end
14
+
15
+ def initialize name: nil, label: nil, chip_family: nil, versions: Core::EMPTY_ARRAY
16
+ super
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -21,9 +21,17 @@ module TRMNL
21
21
  :offset_x,
22
22
  :offset_y,
23
23
  :palette_names,
24
+ :default_palette_name,
24
25
  :css
25
26
  ) do
26
- def self.for(attributes) = new(**attributes.transform_keys!(palette_ids: :palette_names))
27
+ def self.for attributes
28
+ new(
29
+ **attributes.transform_keys!(
30
+ palette_ids: :palette_names,
31
+ default_palette_id: :default_palette_name
32
+ )
33
+ )
34
+ end
27
35
 
28
36
  def initialize(**)
29
37
  super
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TRMNL
4
+ module API
5
+ module Models
6
+ # Models the data of the API response.
7
+ Version = Data.define :label, :uri do
8
+ def self.for(**attributes) = new(**attributes.transform_keys!(version: :label, url: :uri))
9
+ end
10
+ end
11
+ end
12
+ end
@@ -8,13 +8,18 @@ module TRMNL
8
8
  # Validates API response.
9
9
  Display = Dry::Schema.JSON do
10
10
  required(:filename).filled :string
11
- required(:firmware_url).filled :string
12
- optional(:firmware_version).maybe :string
13
11
  required(:image_url).filled :string
12
+ optional(:image_url_timeout).filled :integer
14
13
  required(:refresh_rate).filled :integer
14
+ optional(:firmware_version).filled :string
15
+ required(:firmware_url).filled :string
15
16
  required(:reset_firmware).filled :bool
16
- required(:special_function).filled :string
17
17
  required(:update_firmware).filled :bool
18
+ optional(:maximum_compatibility).filled :bool
19
+ optional(:temperature_profile).filled :string
20
+ optional(:touchbar_mode).filled :string
21
+ optional(:action).filled :string
22
+ optional(:playlist_image_names).filled(:array).each(:string)
18
23
  end
19
24
  end
20
25
  end
@@ -7,10 +7,7 @@ module TRMNL
7
7
  module Schemas
8
8
  module Firmware
9
9
  # Validates API response.
10
- Latest = Dry::Schema.JSON do
11
- required(:url).filled :string
12
- required(:version).filled :string
13
- end
10
+ Many = Dry::Schema.JSON { required(:data).filled(:array).each Record }
14
11
  end
15
12
  end
16
13
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/schema"
4
+
5
+ module TRMNL
6
+ module API
7
+ module Schemas
8
+ module Firmware
9
+ # Validates record.
10
+ Record = Dry::Schema.JSON do
11
+ required(:label).filled :string
12
+ required(:model).filled :string
13
+ required(:chip_family).filled :string
14
+ required(:latest).filled :string
15
+ required(:url).filled :string
16
+ required(:versions).filled(:array).each(:hash) do
17
+ required(:version).filled :string
18
+ required(:url).filled :string
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/schema"
4
+
5
+ module TRMNL
6
+ module API
7
+ module Schemas
8
+ module Firmware
9
+ # Validates API response.
10
+ Sole = Dry::Schema.JSON { required(:data).hash Record }
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/schema"
4
+
5
+ module TRMNL
6
+ module API
7
+ module Schemas
8
+ # Validates API response.
9
+ Flash = Dry::Schema.JSON do
10
+ required(:data).filled(:hash) do
11
+ required(:models).filled(:array).each(:hash) do
12
+ required(:keyname).filled :string
13
+ required(:label).filled :string
14
+ required(:chipFamily).filled :string
15
+ required(:versions).filled(:array).each(:hash) do
16
+ required(:version).filled :string
17
+ required(:url).filled :string
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -22,6 +22,7 @@ module TRMNL
22
22
  required(:offset_x).filled :integer
23
23
  required(:offset_y).filled :integer
24
24
  required(:palette_ids).array(:string)
25
+ required(:default_palette_id).filled :string
25
26
  optional(:css).hash do
26
27
  optional(:classes).hash do
27
28
  required(:density).filled :string
data/trmnl-api.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "trmnl-api"
5
- spec.version = "0.22.0"
5
+ spec.version = "0.24.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/trmnl-api"
data.tar.gz.sig CHANGED
Binary file