Skip to content

Commit

Permalink
feat: add uriVariables to example
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Mar 11, 2022
1 parent 1725d47 commit ad3e5a6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions example/dart_wot_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ final thingDescriptionJson = '''
}
]
},
"anotherStatus": {
"uriVariables": {
"test": {
"type": "string"
}
},
"forms": [
{
"href": "coap://coap.me/query{?test}"
}
]
},
"test": {
"forms": [
{
Expand Down Expand Up @@ -101,6 +113,11 @@ Future<void> main() async {
final value2 = await status2.value();
print(value2);

final status3 = await consumedThing.readProperty(
"anotherStatus", InteractionOptions(uriVariables: {"test": "hi"}));
final value3 = await status3.value();
print(value3);

Subscription? subscription;

// TODO(JKRhb): Turn into a "real" observation example.
Expand Down

0 comments on commit ad3e5a6

Please sign in to comment.