InfluxDBClient.connectV1 constructor

InfluxDBClient.connectV1({
  1. String? url,
  2. String? username,
  3. String? password,
  4. String? database,
  5. String? retentionPolicy,
  6. bool debug = defaultEnableDebug,
  7. int maxRedirects = defaultMaxRedirects,
  8. bool followRedirects = defaultFollowRedirects,
})

Create a new client for InfluxDB 1.8 compatibility API.

Implementation

factory InfluxDBClient.connectV1(
    {String? url,

    /// Username for authentication
    String? username,

    /// Password for authentication
    String? password,

    /// Target database
    String? database,

    /// Target retention policy
    String? retentionPolicy,

    /// verbose logging of http calls
    bool debug = defaultEnableDebug,
    int maxRedirects = defaultMaxRedirects,
    bool followRedirects = defaultFollowRedirects}) {
  return InfluxDBClient(
      url: url,
      bucket: '$database/$retentionPolicy',
      username: username,
      password: password,
      debug: debug,
      maxRedirects: maxRedirects,
      followRedirects: followRedirects);
}