haystack 1.0.0-dev.0.3

  • Readme
  • Changelog
  • Installing
  • 61

haystack #

Port of haystack java toolkit. Use it to connect and work with SkySpark. [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). Authentication methods are skipped now, so you can use this library from SkySpark pub folder. Just create in you SkySpark's folder root 'pub' directory and place here your app. It will be accessible by 'localhost_or_smth:80/pub/my_app.html'. Only client side is implemented at this moment, you can't use it from server or command-line apps.

Usage #

A simple usage example (include this into HTML page):

import 'package:haystack/core.dart';
import 'package:haystack/hclient.dart';

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

main() {
  client = new HClient(uri, user, pass);
  client.open().then((_) => client.about()).then((HDict result) {
    print(result);
  });
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

1.0.0-dev.0.3 #

  • Fixed null get errors for HDict

1.0.0-dev.0.2+4 #

  • Extracted client into other package
  • Made HVal immutable
  • Fixed analysis warnings
  • Added checked flag for HDict get methods

0.6.1+1 #

  • Added zinc mime type

0.6.1 #

  • Added common SkySpark interface for web and flutter clients

0.6.0+9 #

  • HTime: fixed zinc decoding for fractional seconds
  • Added commit method in HProj
  • Added simplify utils
  • Improved editing grids in HGridBuilder
  • Fixed types in Error handlers due to Dart update
  • Make CallErrError readable in console

0.6.0+5 #

  • Updated http dependency
  • Fixed CryptoUtils inport
  • Removed build in tag lists
  • Now HClientFlutter can be reused for another project
  • HClientFlutter provides setter and getter of headers for authentication requests

0.6.0 #

  • Fixed dart2 compatibility

0.6.0-dev.0.1+2 #

  • Fixed type errors
  • Fixed sdk and dependencies constrains

0.6.0-dev.0.1 #

  • Switched to dart 2

0.5.0 #

  • Made types more strict

0.4.21+1 #

  • Added HNull class

0.4.21 #

  • Updated version header

0.4.20+3 #

  • Fixed grid dump with sub-grids

0.4.20+2 #

  • Added List implementation for HGrid (unmodifiable)

0.4.20+1 #

  • Fixed column's dis method

0.4.20 #

  • Fixed HGrid toString method

0.4.19 #

  • Fixed dollar sign string parsing

0.4.18 #

  • Added HList, HXStr,
  • Made HDict and HGrid HVals
  • Enhanced Zinc for nested data structures
  • Created HaystackTokenizer for parsing haystack types

0.4.17 #

  • test renamed to work with automatic testing

0.4.16 #

  • added HGrid.rows readonly getter
  • fixed tests to work with new test package

0.4.15 #

  • added tags

0.4.14 #

  • added map interface for HDict, HRow and HHisItem

0.4.13 #

  • fixed initial bool value error in HClientWatch class

0.4.11 #

  • Just fixed hclient library names conflict

0.4.10 #

  • Added HRemove singleton

0.4.0 #

  • Initial version, created by Dmitriy Vasilyev aka kelegorm

Use this package as a library

1. Depend on it

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


dependencies:
  haystack: ^1.0.0-dev.0.3

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/haystack.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
38
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Nov 4, 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/haystack.dart with components: io.

Health suggestions

Fix lib/src/HDict.dart. (-1 points)

Analysis of lib/src/HDict.dart reported 2 hints:

line 12 col 16: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: HDict._hashCode

line 224 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: HDict._hashCode

Fix lib/src/HHisItem.dart. (-0.50 points)

Analysis of lib/src/HHisItem.dart reported 1 hint:

line 11 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: HDict._hashCode

Fix lib/src/HRow.dart. (-0.50 points)

Analysis of lib/src/HRow.dart reported 1 hint:

line 11 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: HRow._grid, HRow._cells, HDict._hashCode

Fix additional 16 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/haystack.dart (Run dartfmt to format lib/haystack.dart.)
  • lib/src/HCoord.dart (Run dartfmt to format lib/src/HCoord.dart.)
  • lib/src/HDate.dart (Run dartfmt to format lib/src/HDate.dart.)
  • lib/src/HGrid.dart (Run dartfmt to format lib/src/HGrid.dart.)
  • lib/src/HGridBuilder.dart (Run dartfmt to format lib/src/HGridBuilder.dart.)
  • lib/src/HNum.dart (Run dartfmt to format lib/src/HNum.dart.)
  • lib/src/HProj.dart (Run dartfmt to format lib/src/HProj.dart.)
  • lib/src/HStr.dart (Run dartfmt to format lib/src/HStr.dart.)
  • lib/src/HUri.dart (Run dartfmt to format lib/src/HUri.dart.)
  • lib/src/HVal.dart (Run dartfmt to format lib/src/HVal.dart.)
  • lib/src/HXStr.dart (Run dartfmt to format lib/src/HXStr.dart.)
  • lib/src/client/SkysparkProj.dart (Run dartfmt to format lib/src/client/SkysparkProj.dart.)
  • lib/src/io/HaystackToken.dart (Run dartfmt to format lib/src/io/HaystackToken.dart.)
  • lib/src/tags.dart (Run dartfmt to format lib/src/tags.dart.)
  • lib/src/utils/simplify.dart (Run dartfmt to format lib/src/utils/simplify.dart.)
  • lib/utils.dart (Run dartfmt to format lib/utils.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (intl, unicode).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and haystack.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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
collection ^1.14.6 1.14.12
intl ^0.15.7 0.15.8 0.16.0
quiver >=0.29.0+1 <3.0.0 2.1.1
unicode ^0.1.0 0.1.0 0.2.2
Transitive dependencies
lists 0.0.23 0.1.3
matcher 0.12.6
meta 1.1.8
path 1.6.4
stack_trace 1.9.3
Dev dependencies
test >=0.12.18+2 <2.0.0