trmnl-api 0.17.0 → 0.18.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: 94b1ad8ad76a962c9067fc57e7e95052ee621c6e840f2c9b691288bbfce0b498
4
- data.tar.gz: a642573903e732131f8fe43a266023dc802a6d4bd2b2e84119b975b5a52a4dda
3
+ metadata.gz: 53ff339ba72c6568e9b5aafd75321a2871be92734063b90d930056622f12c59d
4
+ data.tar.gz: e8a043fe4de8e36107b5ead8f50baee1f1d2f81ff5bd59e89ea46e57d3a8e892
5
5
  SHA512:
6
- metadata.gz: bf8a868885c1e400f3090af2cd403a07bd57844a0f00bf76a9aa2fa286639d50bd25bc04e34639f4e46f275549cb54032f22045c76c8bc2670eddd45eb4112d5
7
- data.tar.gz: 8012a1a81d90c6a2b40786cf163dddca5e25e94b872a70c8df8b1629914da3898f4ceb4041b2a101c908c9fcb4b4ffcbbf5b05ada985d2101485c37f25ea357f
6
+ metadata.gz: e1a6ddbd252c972602cfff5f6b852c710e7c125782b222e5dd565e01df26a75d835903814b01c0fabc8b481fb03e737b0d9a6c13358394e7e8aeca9fa4955216
7
+ data.tar.gz: 4aadc7f790c617b74e54caf5ff83efb8e4b2d06d17ce59c4fec595e3a4f93d1dc3721ce87287df8ac9c92726d04eca202ea668888bc3fe6edb2dd872ef6ad18e
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -138,14 +138,17 @@ client.display token: "secret"
138
138
 
139
139
  # Success(
140
140
  # #<struct TRMNL::API::Models::Display
141
- # filename="plugin-1745348489",
142
- # firmware_url="https://trmnl-fw.s3.us-east-2.amazonaws.com/FW1.4.8.bin",
143
- # firmware_version="1.4.8",
144
- # image_url="https://trmnl.s3.us-east-2.amazonaws.com/plugin-1745348489",
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
145
  # image_url_timeout=0,
146
- # refresh_rate=1771,
146
+ # maximum_compatibility=false,
147
+ # refresh_rate=1765,
147
148
  # reset_firmware=false,
148
149
  # special_function="restart_playlist",
150
+ # temperature_profile="default",
151
+ # touchbar_mode="tap",
149
152
  # update_firmware=true
150
153
  # >
151
154
  # )
@@ -4,36 +4,38 @@ module TRMNL
4
4
  module API
5
5
  module Models
6
6
  # Models the data of the API response.
7
- Display = Struct.new(
7
+ Display = Data.define(
8
8
  :filename,
9
9
  :firmware_url,
10
10
  :firmware_version,
11
11
  :image_url,
12
12
  :image_url_timeout,
13
+ :maximum_compatibility,
13
14
  :refresh_rate,
14
15
  :reset_firmware,
15
16
  :special_function,
17
+ :temperature_profile,
18
+ :touchbar_mode,
16
19
  :update_firmware
17
20
  ) do
18
21
  def self.for(attributes) = new(**attributes)
19
22
 
20
- def initialize(**)
23
+ def initialize filename: nil,
24
+ firmware_url: nil,
25
+ firmware_version: nil,
26
+ image_url: nil,
27
+ image_url_timeout: 0,
28
+ maximum_compatibility: false,
29
+ refresh_rate: 300,
30
+ reset_firmware: false,
31
+ special_function: "sleep",
32
+ temperature_profile: "default",
33
+ touchbar_mode: "tap",
34
+ update_firmware: false
21
35
  super
22
- apply_defaults
23
- freeze
24
36
  end
25
37
 
26
38
  def to_json(*) = to_h.to_json(*)
27
-
28
- private
29
-
30
- def apply_defaults
31
- self[:image_url_timeout] ||= 0
32
- self[:refresh_rate] ||= 300
33
- self[:reset_firmware] ||= false
34
- self[:update_firmware] ||= false
35
- self[:special_function] ||= "sleep"
36
- end
37
39
  end
38
40
  end
39
41
  end
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.17.0"
5
+ spec.version = "0.18.0"
6
6
  spec.authors = ["TRMNL"]
7
7
  spec.email = ["engineering@trmnl.com"]
8
8
  spec.homepage = "https://github.com/usetrmnl/trmnl-api"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TRMNL
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
270
  requirements: []
271
- rubygems_version: 4.0.12
271
+ rubygems_version: 4.0.13
272
272
  specification_version: 4
273
273
  summary: A monadic TRMNL API client.
274
274
  test_files: []
metadata.gz.sig CHANGED
Binary file