trmnl-api 0.10.0 → 0.11.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +9 -8
- data/lib/trmnl/api/configuration/loader.rb +1 -1
- data/lib/trmnl/api/contracts/display.rb +1 -0
- data/lib/trmnl/api/models/display.rb +1 -0
- data/trmnl-api.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff7ecb483d86f9e68a550342e7e923e08ac1ef5d7330a12f4631e94e7a517438
|
|
4
|
+
data.tar.gz: a249a3fd8c173416d35fb2da4a15be7accf19e29e6505e667c90b4f440866047
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40d5b26f6f84761379eb2078048ed792eb376506c3e7bc4d59bd05f08215008be16ccff61548cbd63a302350b357174c479fefcce692cd0d34c6fac3d280dd05
|
|
7
|
+
data.tar.gz: c8ac0a599cf3743f67f58ac0e9021277b08327110b952b4b7c0aabf45ad3679eeae05b0bfe44dc2ea39e191c6370a857558b3422193d01edb82d49c2b4b2d4d3
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/README.adoc
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
:toclevels: 5
|
|
3
3
|
:figure-caption!:
|
|
4
4
|
|
|
5
|
-
:trmnl_link: link:https://
|
|
6
|
-
:trmnl_api_link: link:https://
|
|
5
|
+
:trmnl_link: link:https://trmnl.com[TRMNL]
|
|
6
|
+
:trmnl_api_link: link:https://trmnl.com/api-docs/index.html[TRMNL API]
|
|
7
7
|
:dry_monads_link: link:https://dry-rb.org/gems/dry-monads[Dry Monads]
|
|
8
8
|
|
|
9
9
|
= TRMNL API
|
|
@@ -113,7 +113,7 @@ client.current_screen token: "secret"
|
|
|
113
113
|
# Success(
|
|
114
114
|
# #<data TRMNL::API::Models::CurrentScreen
|
|
115
115
|
# refresh_rate=1773,
|
|
116
|
-
# image_url="https://
|
|
116
|
+
# image_url="https://trmnl.com/plugin-2025-04-10T11-34-38Z-380c77",
|
|
117
117
|
# filename="plugin-2025-04-10T11-34-38Z-380c77"
|
|
118
118
|
# >
|
|
119
119
|
# )
|
|
@@ -132,6 +132,7 @@ client.display token: "secret"
|
|
|
132
132
|
# #<struct TRMNL::API::Models::Display
|
|
133
133
|
# filename="plugin-1745348489",
|
|
134
134
|
# firmware_url="https://trmnl-fw.s3.us-east-2.amazonaws.com/FW1.4.8.bin",
|
|
135
|
+
# firmware_version="1.4.8",
|
|
135
136
|
# image_url="https://trmnl.s3.us-east-2.amazonaws.com/plugin-1745348489",
|
|
136
137
|
# image_url_timeout=0,
|
|
137
138
|
# refresh_rate=1771,
|
|
@@ -302,11 +303,11 @@ Success(
|
|
|
302
303
|
|
|
303
304
|
==== Recipes
|
|
304
305
|
|
|
305
|
-
Allows you to obtain information about link:https://
|
|
306
|
+
Allows you to obtain information about link:https://trmnl.com/recipes[Recipes]. Example:
|
|
306
307
|
|
|
307
308
|
[source,ruby]
|
|
308
309
|
----
|
|
309
|
-
client = TRMNL::API.new { |settings| settings.uri = "https://
|
|
310
|
+
client = TRMNL::API.new { |settings| settings.uri = "https://trmnl.com" }
|
|
310
311
|
|
|
311
312
|
client.recipes # Answers first page.
|
|
312
313
|
client.recipes page: 10 # Answers page ten.
|
|
@@ -376,7 +377,7 @@ client.recipes sort: "popularity" # Answers first page sorted by popularity.
|
|
|
376
377
|
# )
|
|
377
378
|
----
|
|
378
379
|
|
|
379
|
-
⚠️ This _does not_ use the {trmnl_api_link} like every other endpoint documented here. Instead, you must customize the settings URI to point to the root of the TRMNL application (i.e. `https://
|
|
380
|
+
⚠️ This _does not_ use the {trmnl_api_link} like every other endpoint documented here. Instead, you must customize the settings URI to point to the root of the TRMNL application (i.e. `https://trmnl.com`) instead of using the default API endpoint.
|
|
380
381
|
|
|
381
382
|
You'll always get a `data` array which may or may not be filled and `meta` (metadata) for handling pagination information. You can also combine the `page`, `search`, and `page` parameters as you see fit.
|
|
382
383
|
|
|
@@ -393,7 +394,7 @@ client.setup id: "A1:B2:C3:D4:E5:F6"
|
|
|
393
394
|
# #<data TRMNL::API::Models::Setup
|
|
394
395
|
# api_key="secret",
|
|
395
396
|
# friendly_id="F51FDE",
|
|
396
|
-
# image_url="https://
|
|
397
|
+
# image_url="https://trmnl.com/images/setup/setup-logo.bmp",
|
|
397
398
|
# message="Register at usetrmnl.com/signup with Device ID 'F51FDE'"
|
|
398
399
|
# >
|
|
399
400
|
# )
|
|
@@ -429,4 +430,4 @@ bin/rake
|
|
|
429
430
|
== Credits
|
|
430
431
|
|
|
431
432
|
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
|
|
432
|
-
* Engineered by link:https://
|
|
433
|
+
* Engineered by link:https://trmnl.com/developers[TRMNL].
|
|
@@ -13,7 +13,7 @@ module TRMNL
|
|
|
13
13
|
def call
|
|
14
14
|
model[
|
|
15
15
|
content_type: environment.fetch("TRMNL_API_CONTENT_TYPE", "application/json"),
|
|
16
|
-
uri: environment.fetch("TRMNL_API_URI", "https://
|
|
16
|
+
uri: environment.fetch("TRMNL_API_URI", "https://trmnl.com/api")
|
|
17
17
|
]
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -9,6 +9,7 @@ module TRMNL
|
|
|
9
9
|
Display = Dry::Schema.JSON do
|
|
10
10
|
required(:filename).filled :string
|
|
11
11
|
required(:firmware_url).filled :string
|
|
12
|
+
optional(:firmware_version).maybe :string
|
|
12
13
|
required(:image_url).filled :string
|
|
13
14
|
required(:refresh_rate).filled :integer
|
|
14
15
|
required(:reset_firmware).filled :bool
|
data/trmnl-api.gemspec
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|