haystack 0.4.21+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 59

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

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

example/main.dart

// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library haystack.example;

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);
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  haystack: "^0.4.21+1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support 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/core.dart';

      import 'package:haystack/hclient.dart';
  
Version Uploaded Documentation Archive
0.4.21+1 Feb 5, 2018 Go to the documentation of haystack 0.4.21+1 Download haystack 0.4.21+1 archive
0.4.21 Aug 4, 2017 Go to the documentation of haystack 0.4.21 Download haystack 0.4.21 archive
0.4.20+6 Apr 26, 2017 Go to the documentation of haystack 0.4.20+6 Download haystack 0.4.20+6 archive
0.4.20+5 Mar 16, 2017 Go to the documentation of haystack 0.4.20+5 Download haystack 0.4.20+5 archive
0.4.20+4 Mar 13, 2017 Go to the documentation of haystack 0.4.20+4 Download haystack 0.4.20+4 archive
0.4.20+2 Mar 8, 2017 Go to the documentation of haystack 0.4.20+2 Download haystack 0.4.20+2 archive
0.4.20+1 Feb 19, 2017 Go to the documentation of haystack 0.4.20+1 Download haystack 0.4.20+1 archive
0.4.20 Feb 3, 2017 Go to the documentation of haystack 0.4.20 Download haystack 0.4.20 archive
0.4.19 Nov 15, 2016 Go to the documentation of haystack 0.4.19 Download haystack 0.4.19 archive
0.4.18 Nov 15, 2016 Go to the documentation of haystack 0.4.18 Download haystack 0.4.18 archive

All 22 versions...

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
27 / 100
Health:
Code health derived from static analysis. [more]
93 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
89 / 100
Overall score:
Weighted score of the above. [more]
59
Learn more about scoring.

Platforms

Detected platforms: web

Platform components identified in package: html.

Suggestions

  • Use constrained dependencies.

    The pubspec.yaml contains 4 dependencies without version constraints. Specify version ranges for the following dependencies: collection, intl, quiver, unicode_helper.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 10 errors 65 hints.

    Strong-mode analysis of lib/src/HDict.dart failed with the following error:

    line: 225 col: 3
    Invalid override. The type of '_MapImpl.[]' ('(String) → HVal') isn't a subtype of 'Map<String, HVal>.[]' ('(Object) → HVal').

    Strong-mode analysis of lib/src/HGrid.dart failed with the following error:

    line: 105 col: 3
    Invalid override. The type of 'HGrid.indexOf' ('(HRow, [int]) → int') isn't a subtype of 'ListMixin<HRow>.indexOf' ('(Object, [int]) → int').

    Similar analysis of the following files failed:

    • lib/src/HHisItem.dart (error)
    • lib/src/HRow.dart (error)
    • lib/src/io/HZincReader.dart (error)
    • lib/core.dart (hint)
    • lib/hclient.dart (hint)
    • lib/src/HBin.dart (hint)
    • lib/src/HBool.dart (hint)
    • lib/src/HCol.dart (hint)
    • lib/src/HCoord.dart (hint)
    • lib/src/HDate.dart (hint)
    • lib/src/HDateTime.dart (hint)
    • lib/src/HDateTimeRange.dart (hint)
    • lib/src/HDictBuilder.dart (hint)
    • lib/src/HFilter.dart (hint)
    • lib/src/HGridBuilder.dart (hint)
    • lib/src/HList.dart (hint)
    • lib/src/HMarker.dart (hint)
    • lib/src/HNA.dart (hint)
    • lib/src/HNull.dart (hint)
    • lib/src/HNum.dart (hint)
    • lib/src/HProj.dart (hint)
    • lib/src/HRef.dart (hint)
    • lib/src/HRemove.dart (hint)
    • lib/src/HStr.dart (hint)
    • lib/src/HTime.dart (hint)
    • lib/src/HTimeZone.dart (hint)
    • lib/src/HUri.dart (hint)
    • lib/src/HVal.dart (hint)
    • lib/src/HWatch.dart (hint)
    • lib/src/HXStr.dart (hint)
    • lib/src/ParseError.dart (hint)
    • lib/src/UnknownNameError.dart (hint)
    • lib/src/UnknownRecError.dart (hint)
    • lib/src/UnknownWatchError.dart (hint)
    • lib/src/client/CallErrError.dart (hint)
    • lib/src/client/CallError.dart (hint)
    • lib/src/client/HClient.dart (hint)
    • lib/src/io/HGridReader.dart (hint)
    • lib/src/io/HGridWriter.dart (hint)
    • lib/src/io/HJsonWriter.dart (hint)
    • lib/src/io/HZincWriter.dart (hint)
    • lib/src/io/HaystackTokenizer.dart (hint)
    • lib/src/str-utils.dart (hint)
    • lib/src/tags.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
collection any 1.14.10
intl any 0.15.6
quiver any 0.29.0+1
unicode_helper any 0.2.0
Transitive dependencies
matcher 0.12.3
meta 1.1.5
path 1.6.1
sparse_list 0.1.0
stack_trace 1.9.2
Dev dependencies
browser any
test >=0.12.18+2 <0.13.0