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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a754ac699d2142cb950f2bc7739616181a33f085c99b244856f9115f823b6e
4
- data.tar.gz: 8a221272e414bed3c1c25a8517c91bbce9286655c51057d9487077abdad22d6c
3
+ metadata.gz: 569d9d6bbfd5690691f558a31079e9837b9c39141c02e5f43e44bd58cfbf2663
4
+ data.tar.gz: e77c972a0cebebc856605a9fb3c4b7fc99bb6c475f786900e7eba0e3b508875e
5
5
  SHA512:
6
- metadata.gz: fadb0d344109f6a8ae6b84f411ee7f7363c708daa823a68c5adcd875871dc41928526505241587fa3218a48ece69acc2142d787245c2ce41a28e0cb30e3d28b5
7
- data.tar.gz: 3ae4afaab60d62d8a1d8e6d776175031915cea50f237af2a025686c769a02651bc9137e2e3ffd4aa95bc24c925bc2f18b6a04161e33c1b8a683c1b7adb2467c4
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.call
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.call token: "secret",
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.call id: "A1:B2:C3:D4:E5:F6"
184
+ client.setup id: "A1:B2:C3:D4:E5:F6"
185
185
 
186
186
  # Success(
187
187
  # #<data TRMNL::API::Models::Setup
@@ -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?
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "inspectable"
3
4
  require "pipeable"
4
5
 
5
6
  module TRMNL
@@ -13,6 +14,7 @@ module TRMNL
13
14
  model: "models.current_screen"
14
15
  ]
15
16
 
17
+ include Inspectable[contract: :class]
16
18
  include Pipeable
17
19
 
18
20
  def call token:
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "inspectable"
3
4
  require "pipeable"
4
5
 
5
6
  module TRMNL
@@ -13,6 +14,7 @@ module TRMNL
13
14
  model: "models.display"
14
15
  ]
15
16
 
17
+ include Inspectable[contract: :class]
16
18
  include Pipeable
17
19
 
18
20
  def call token:
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "inspectable"
3
4
  require "pipeable"
4
5
 
5
6
  module TRMNL
@@ -13,6 +14,7 @@ module TRMNL
13
14
  model: "models.firmware"
14
15
  ]
15
16
 
17
+ include Inspectable[contract: :class]
16
18
  include Pipeable
17
19
 
18
20
  def call
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "inspectable"
3
4
  require "pipeable"
4
5
 
5
6
  module TRMNL
@@ -13,6 +14,7 @@ module TRMNL
13
14
  model: "models.setup"
14
15
  ]
15
16
 
17
+ include Inspectable[contract: :class]
16
18
  include Pipeable
17
19
 
18
20
  def call id:
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.1.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.1.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.8
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