haystack_client 0.1.0-dev.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

haystack #

Client for SkySpark servers using haystack protocol. [Project Haystack]http://project-haystack.org/ defines a tagging model and REST API for sensor systems such as HVAC, lighting, and energy equipment. [SkySpark] is a project to serve your IoT data and make analytics.

To use this package you need installed SkySpark server (and apply a some license) or have access to some other SkySpark.

Usage #

A simple usage example:

import 'package:haystack_client/haystack_client.dart';

final String uri = "http://localhost:8080/api/demo";
final String user = "haystack";
final String pass = "testpass";

void main() async {
  var client = new HSkySparkClient(uri, user, pass);
  await client.open();
  
  var result = client.about();
  print(result);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.0-dev.0.4 #

  • Updated haystack dependency

0.1.0-dev.0.3 #

  • Fixed code style

0.1.0-dev.0.2 #

  • Fixed readme and about
  • Added example

0.1.0-dev.0.1 #

  • Extracted from haystack package

example/main.dart

import 'package:haystack_client/haystack_client.dart';

final String uri = "http://localhost/api/demo";
final String user = "su";
final String pass = "su";

void main() async {
  var client = new HSkySparkClient(uri, user, pass);
  await client.open();

  var result = client.about();
  print(result);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  haystack_client: ^0.1.0-dev.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:haystack_client/haystack_client.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
18
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

We analyzed this package on Nov 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:haystack_client/haystack_client.dart with components: io.

Health suggestions

Format lib/haystack_client.dart.

Run dartfmt to format lib/haystack_client.dart.

Format lib/src/auth/auth.dart.

Run dartfmt to format lib/src/auth/auth.dart.

Format lib/src/auth/auth_msg.dart.

Run dartfmt to format lib/src/auth/auth_msg.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/auth/auth_scheme.dart (Run dartfmt to format lib/src/auth/auth_scheme.dart.)
  • lib/src/auth/scram_scheme.dart (Run dartfmt to format lib/src/auth/scram_scheme.dart.)
  • lib/src/client/h_skyspark_client.dart (Run dartfmt to format lib/src/client/h_skyspark_client.dart.)
  • lib/src/util/crypto_util.dart (Run dartfmt to format lib/src/util/crypto_util.dart.)

Maintenance suggestions

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
crypto ^2.0.3 2.1.3
haystack ^1.0.0-dev.0.2+4 1.0.0-dev.0.3
http ^0.12.0 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
http_parser 3.1.3
intl 0.15.8 0.16.0
lists 0.0.23 0.1.3
matcher 0.12.6
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1
quiver 2.1.2+1
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
unicode 0.1.0 0.2.2