Skip to content

Commit

Permalink
[UPDATE] documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Aug 20, 2014
1 parent 863da50 commit 93ab6cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ Datum
=====
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]

[OpenTSDB](http://opentsdb.net) datapoint model.
> [OpenTSDB](http://opentsdb.net) datapoint model.
This library implements the OpenTSDB data [model](http://opentsdb.net/docs/build/html/user_guide/writing.html#data-specification), where the model represents a single timeseries datapoint (datum).


### Install
Expand All @@ -18,12 +20,12 @@ For use in the browser, use [browserify](https://github.com/substack/node-browse

### Data Model

OpenTSDB specifies a data [model](http://opentsdb.net/docs/build/html/user_guide/writing.html#data-specification) for every timeseries datapoint. To create an OpenTSDB datum,
To create an OpenTSDB datum,

``` javascript
var dataFactory = require( 'opentsdb-datum' );
var createDatum = require( 'opentsdb-datum' );

var datum = dataFactory();
var datum = createDatum();
```

A datum is configurable and has the following methods...
Expand Down Expand Up @@ -132,8 +134,8 @@ console.log( data );
When used as setters, all setter/getter methods are chainable. For example,

``` javascript
var dataFactory = require( 'opentsdb-datum' ),
datum = dataFactory();
var createDatum = require( 'opentsdb-datum' ),
datum = createDatum();

datum
.metric( 'cpu.utilization' )
Expand Down
6 changes: 3 additions & 3 deletions examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@

// MODULES //

var // OpenTSDB datapoint model factory:
dataFactory = require( './../lib' );
var // OpenTSDB datapoint factory:
createDatum = require( './../lib' );


// SCRIPT //

var datum = dataFactory();
var datum = createDatum();

// Configure the datum:
datum
Expand Down

0 comments on commit 93ab6cf

Please sign in to comment.