Skip to content

janstol/edeskyclient_dart

Repository files navigation

Edesky client

Pub CI

Dart client for Czech service edesky.cz API. Supports dashboards and documents querying.

Development

This repository pins Dart with mise.

mise install
mise exec -- dart pub get
mise exec -- dart analyze
mise exec -- dart test

Usage

dependencies:
  edeskyclient: ^1.2.0
import 'package:edeskyclient/edeskyclient.dart';
import 'package:http/http.dart';

Future<void> main() async {
  final edesky = EdeskyClient(
    apiKey: 'xyz', //insert your api key
    httpClient: Client(),
  );

  // Fetch all dashboards
  final dashboards = await edesky.queryDashboards();
  print(dashboards.first.name);

  // ...

  // Fetch single dashboard by ID
  final dashboard = await edesky.queryDashboard(1);
  print(dashboard.name);

  // ...

  // Search documents
  final searchResult = await edesky.queryDocuments(keywords: 'prodej');
  print('${searchResult.first.name}, ${searchResult.first.url}');

  // close http client when it's done being used
  edesky.close();

  // ...
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

About

Dart client for edesky.cz API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages