You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add main-next-release to test workflows, & some minor generic updates (#75)
* fast forward doc and examples
* add contributing section in README
* allow class_member set only for class member parameters
* update live example to live demo
* add main-next-release to test workflows
* fast forward doc and examples
* fast-forward docs and examples commits even more
* fast forward doc and examples
* add main-next-release to test workflows
* fast-forward docs and examples commits even more
* update README, minor edits on contributions from @PFKimmerle
The HTTP API may be autogenerated or adjusted by the user. If your plan is to develop a truly networked system, it is recommended to learn more and
328
-
use [Thing Descriptions](https://www.w3.org/TR/wot-thing-description11) to describe your hardware (This is optional and one can still use a classic HTTP client). A Thing Description will be automatically generated if absent as shown in JSON examples above or can be supplied manually. The default end point to fetch thing descriptions are: <br> `http(s)://<host name>/<instance name of the thing>/resources/wot-td` <br>
329
-
If there are errors in generation of Thing Description
330
-
(mostly due to JSON non-complaint types), one could use: <br> `http(s)://<host name>/<instance name of the thing>/resources/wot-td?ignore_errors=true`
324
+
use [Thing Descriptions](https://www.w3.org/TR/wot-thing-description11) to describe your hardware (This is optional and one can still use a classic HTTP client). A Thing Description will be automatically generated if absent as shown in JSON examples above or can be supplied manually. The default end point to fetch thing descriptions are:
331
325
332
-
(client docs will be updated here next, also check official docs)
### Consuming Thing Descriptions using Node-WoT (Javascript)
331
+
If there are errors in generation of Thing Description (mostly due to JSON non-complaint types), use the second endpoint which may generate at least a partial but useful Thing Description.
335
332
336
-
`hololinked` servers expose Thing Descriptions (TDs) which are compatible with Web of Things clients like [Node-WoT](https://github.com/eclipse-thingweb/node-wot). A TD is automatically generated and can be fetched from:
333
+
### Consuming Thing Descriptions using node-wot (Javascript)
337
334
338
-
Example TD for a device instance named `spectrometer`:
335
+
The Thing Descriptions (TDs) can be consumed with Web of Things clients like [node-wot](https://github.com/eclipse-thingweb/node-wot). Suppose an example TD for a device instance named `spectrometer` is available at the following endpoint:
You can see an example [here](https://gitlab.com/hololinked/examples/clients/node-clients/phymotion-controllers-app/-/blob/main/src/App.tsx?ref_type=heads#L77).
> Based on verified examples from the [hololinked examples repository](https://github.com/hololinked-dev/examples/tree/main/client-examples/node-wot) and the [ThingWeb node-wot project](https://github.com/eclipse-thingweb/node-wot).
Try out the above code snippets with an online example [using thisTD](http://examples.hololinked.net/simulations/spectrometer/resources/wot-td).
393
400
> Note: due to reverse proxy buffering, subscribeEvent may take up to 1 minute to receive data. All other operations work fine.
394
401
395
-
In React, these calls can be placed inside `useEffect` and the client passed via `useContext`.
396
-
402
+
In React, the Thing Description may be fetched inside `useEffect` hook, the client passed via `useContext` hook and the individual operations can be performed in their own callbacks attached to user elements.
@@ -418,6 +425,6 @@ Again, please check examples or the code for explanations. Documentation is bein
418
425
### Contributing
419
426
420
427
See [organization info](https://github.com/hololinked-dev) for details regarding contributing to this package. There is:
421
-
- discord group - [](https://discord.com/invite/kEz87zqQXh)
0 commit comments