cognite_cdf_sdk 0.1.3 copy "cognite_cdf_sdk: ^0.1.3" to clipboard
cognite_cdf_sdk: ^0.1.3 copied to clipboard

outdated

Read-only SDK for Cognite Data Fusion (CDF) (https://docs.cognite.com/dev/). This SDK is a community project.

cognite_cdf_sdk #

Maintainer: Greger Wedel, https://github.com/gregertw

A Dart package with a simple SDK for Cognite CDF API, https://docs.cognite.com/dev/.

This SDK has been developed specifically for the needs of a Flutter application for time series exploration. Thus, it has built in support for layering of datapoints that simplifies zoom in, zoom out, and visual exploration of a plotted time series. It also has a history of requests that can be used to see exactly the REST API requests and responses that have been executed.

The SDK is currently limited to the timeseries API and is read-only, but it should be fairly easy to extend.

Disclaimer #

Although developed by an employee of Cognite, this SDK has been developed as part of a personal tinkering project, and there are no guarantees that this SDK will be kept updated or extended. It is shared Apache-2 licensed for the benefit of anybody who may have a need for a Dart SDK or may want to contribute.

Contributing #

All activity related to this SDK is on Github. Please use the issue tracker to submit bugs or feature suggestions, or even better: submit a PR!

Getting Started #

Instantiate an http client and off you go!

NOTE!!! You need to supply an HttpClientAdapter() implementation as either found in dio/adapter.dart (DefaultHttpClientAdapter()) or dio/adapter_browser.dart (BrowserHttpClientAdapter()).

import 'package:cognite_cdf_sdk/cognite_cdf_sdk.dart';
import 'package:dio/adapter.dart';

main() async {
  var apiClient = CDFApiClient(
      project: 'project_name',
      apikey: 'myapi_key',
      baseUrl: 'https://api.cognitedata.com/',
      httpAdapter: DefaultHttpClientAdapter());

  var res = await TimeSeriesAPI(apiClient).getAllTimeSeries();
  if (res != null && res.length >= 1) {
    print(res[0].externalId);
  }
}
1
likes
30
pub points
0%
popularity

Publisher

verified publishergreger.io

Read-only SDK for Cognite Data Fusion (CDF) (https://docs.cognite.com/dev/). This SDK is a community project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, logger, mockito

More

Packages that depend on cognite_cdf_sdk