Giter Site home page Giter Site logo

influxdb.net's Introduction

InfluxDB.Net

InfluxDB An open-source distributed time series database with no external dependencies. It is the new home for all of your metrics, events, and analytics.

A Portable .NET library to access the REST API of a InfluxDB database.

Installation
NuGet - InfluxDB.Net
P.S. One of this project's fork already uses InfluxDB.Net name for NuGet package. So, I called my package InfluxDB.Net-Main.

Install-Package InfluxDB.Net-Main -Pre

Circle CI

####List of supported methods (More documentation available soon)

  • Ping
  • Version
  • CreateDatabase
  • DeleteDatabase
  • DescribeDatabases
  • Write
  • Query
  • CreateClusterAdmin(User user);
  • DeleteClusterAdmin(string name);
  • DescribeClusterAdmins();
  • UpdateClusterAdmin(User user, string name);
  • CreateDatabaseUser(string database, User user);
  • DeleteDatabaseUser(string database, string name);
  • DescribeDatabaseUsers(String database);
  • UpdateDatabaseUser(string database, User user, string name);
  • AuthenticateDatabaseUser(string database, string user, string password);
  • GetContinuousQueries(String database);
  • DeleteContinuousQuery(string database, int id);
  • DeleteSeries(string database, string name);
  • ForceRaftCompaction();
  • Interfaces();
  • Sync();
  • ListServers();
  • RemoveServers(int id);
  • CreateShard(Shard shard);
  • GetShards();
  • DropShard(int id, Shard.Member servers);
  • GetShardSpaces();
  • DropShardSpace(string database, string name);
  • CreateShardSpace(string database, ShardSpace shardSpace);

Ping

var _client = new InfluxDb("http://...:8086", "root", "root");
  Pong pong =await _client.PingAsync();

Version

var _client = new InfluxDb("http://...:8086", "root", "root");
  string version =await  _client.VersionAsync();

Create Database

var _client = new InfluxDb("http://...:8086", "root", "root");
 InfluxDbApiCreateResponse response =await  _client.CreateDatabaseAsync("MyDb");
 //Or
 InfluxDbApiCreateResponse response = await _client.CreateDatabaseAsync(new DatabaseConfiguration
            {
                Name = "MyDb"
            });

Delete Database

var _client = new InfluxDb("http://...:8086", "root", "root");
InfluxDbApiDeleteResponse deleteResponse = await _client.DeleteDatabaseAsync("MyDb");

Describe Databases

var _client = new InfluxDb("http://...:8086", "root", "root");
List<Database> databases = await _client.DescribeDatabasesAsync();

Write

var _client = new InfluxDb("http://...:8086", "root", "root");
Serie serie = new Serie.Builder("testSeries")
                .Columns("value1", "value2")
                .Values(DateTime.Now.Millisecond, 5)
                .Build();
InfluxDbApiResponse writeResponse =await _client.WriteAsync("MyDb", TimeUnit.Milliseconds, serie);

Query

var _client = new InfluxDb("http://...:8086", "root", "root");
 List<Serie> series = await _client.QueryAsync("MyDb", "select * from testSeries"), TimeUnit.Milliseconds);

##Bugs If you encounter a bug, performance issue, or malfunction, please add an Issue with steps on how to reproduce the problem.

##TODO

  • Add more tests
  • Add more documentation

##License

Code and documentation are available according to the MIT License (see LICENSE).

influxdb.net's People

Contributors

bugthesystem avatar chrisguest75 avatar tweir avatar

Watchers

Andras Elso avatar Alexey Voskresenskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.