Skip to content

Commit

Permalink
docs(helpers): better document fetch function
Browse files Browse the repository at this point in the history
Improve the documentation of the fetchThingDescription function.
  • Loading branch information
JKRhb committed Jan 1, 2022
1 parent 74e9ef2 commit db2da1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/core/helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class ThingDescriptionFetchException implements Exception {
: message = "Fetching Thing Description from $uri failed.";
}

/// Fetches a Thing Description from a given [uri].
/// Fetches a Thing Description from a given [uri] using a [servient].
///
/// The [servient] needs to support the given [uri] scheme, otherwise a
/// [StateError] is thrown. If the fetched value is not parsable, a
/// [ThingDescriptionFetchException] is thrown.
Future<ThingDescription> fetchThingDescription(
String uri, Servient servient) async {
final parsedUri = Uri.parse(uri);
Expand Down

0 comments on commit db2da1a

Please sign in to comment.