trmnl-api 0.1.0 → 0.2.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 +3 -3
- data/lib/trmnl/api/client.rb +10 -0
- data/lib/trmnl/api/endpoints/current_screen.rb +2 -0
- data/lib/trmnl/api/endpoints/display.rb +2 -0
- data/lib/trmnl/api/endpoints/firmware.rb +2 -0
- data/lib/trmnl/api/endpoints/setup.rb +2 -0
- data/trmnl-api.gemspec +2 -1
- data.tar.gz.sig +0 -0
- metadata +16 -2
- 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: 569d9d6bbfd5690691f558a31079e9837b9c39141c02e5f43e44bd58cfbf2663
|
4
|
+
data.tar.gz: e77c972a0cebebc856605a9fb3c4b7fc99bb6c475f786900e7eba0e3b508875e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26a8717e1cdd331584bc6f390bfc07ef30b072b2f9a5a406c562fd5eee369576b17b149f762ca4f9e48b0c763891e92618e0823eae384d549392910e917b1e8d
|
7
|
+
data.tar.gz: 5b9cfef970999778d870a606961a6dd54de4233eb2343a72b07ff11d26729d91652a324a99fda045998d6f706b91cf078e77ba077d047798ce77e058a162cdef
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -130,7 +130,7 @@ Allows you to obtain the current stable firmware version. Example:
|
|
130
130
|
[source,ruby]
|
131
131
|
----
|
132
132
|
client = TRMNL::API::Client.new
|
133
|
-
client.
|
133
|
+
client.firmware
|
134
134
|
|
135
135
|
# Success(#<data TRMNL::API::Models::Firmware url="https://trmnl-fw.s3.us-east-2.amazonaws.com/FW1.4.8.bin", version="1.4.8">)
|
136
136
|
----
|
@@ -142,7 +142,7 @@ Allows you to create a log entry (which is what the device reports when it captu
|
|
142
142
|
[source,ruby]
|
143
143
|
----
|
144
144
|
client = TRMNL::API::Client.new
|
145
|
-
client.
|
145
|
+
client.log token: "secret",
|
146
146
|
log: {
|
147
147
|
logs_array: [
|
148
148
|
{
|
@@ -181,7 +181,7 @@ Allows you to obtain the setup response for when a new device is setup. You must
|
|
181
181
|
[source,ruby]
|
182
182
|
----
|
183
183
|
client = TRMNL::API::Client.new
|
184
|
-
client.
|
184
|
+
client.setup id: "A1:B2:C3:D4:E5:F6"
|
185
185
|
|
186
186
|
# Success(
|
187
187
|
# #<data TRMNL::API::Models::Setup
|
data/lib/trmnl/api/client.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "inspectable"
|
4
|
+
|
3
5
|
module TRMNL
|
4
6
|
module API
|
5
7
|
# Provides the primary client for making API requests.
|
@@ -14,6 +16,14 @@ module TRMNL
|
|
14
16
|
endpoint_setup: :setup
|
15
17
|
]
|
16
18
|
|
19
|
+
include Inspectable[
|
20
|
+
endpoint_current_screen: :class,
|
21
|
+
endpoint_display: :class,
|
22
|
+
endpoint_firmware: :class,
|
23
|
+
endpoint_log: :class,
|
24
|
+
endpoint_setup: :class
|
25
|
+
]
|
26
|
+
|
17
27
|
def initialize(**)
|
18
28
|
super
|
19
29
|
yield settings if block_given?
|
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.
|
5
|
+
spec.version = "0.2.0"
|
6
6
|
spec.authors = ["TRMNL"]
|
7
7
|
spec.email = ["support@usetrmnl.com"]
|
8
8
|
spec.homepage = "https://github.com/usetrmnl/trmnl-api"
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.14"
|
30
30
|
spec.add_dependency "http", "~> 5.2"
|
31
31
|
spec.add_dependency "infusible", "~> 4.3"
|
32
|
+
spec.add_dependency "inspectable", "~> 0.3"
|
32
33
|
spec.add_dependency "pipeable", "~> 1.3"
|
33
34
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
34
35
|
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TRMNL
|
@@ -119,6 +119,20 @@ dependencies:
|
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '4.3'
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
name: inspectable
|
124
|
+
requirement: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - "~>"
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0.3'
|
129
|
+
type: :runtime
|
130
|
+
prerelease: false
|
131
|
+
version_requirements: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - "~>"
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0.3'
|
122
136
|
- !ruby/object:Gem::Dependency
|
123
137
|
name: pipeable
|
124
138
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
218
|
- !ruby/object:Gem::Version
|
205
219
|
version: '0'
|
206
220
|
requirements: []
|
207
|
-
rubygems_version: 3.6.
|
221
|
+
rubygems_version: 3.6.9
|
208
222
|
specification_version: 4
|
209
223
|
summary: A monadic TRMNL API client.
|
210
224
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|