# Class: Analytics

## ClearBlade. Analytics

#### new Analytics() → {Object}

  Source:
    - ClearBlade.js, line 2209

  ##### Returns:

  ClearBlade.Analytics the created Analytics object
  Type
    Object

### Methods

#### getCount(topic, start, stop, callback)

  Method to retrieve the average payload size for a topic

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `topic` | string | Topic to retrieve the average payload size for
  `start` | int | Point in time in which to begin the query (epoch timestamp)
  `stop` | int | Point in time in which to end the query (epoch timestamp)
  `callback` | function |

  Source:
    - ClearBlade.js, line 2250

  ##### Example

      cb.MessagingStats().getCount(filter, function(err, body) {
         if(err) {
             //handle error
         } else {
             console.log(body);
         }
      });

#### getEventList(topic, start, stop, callback)

  Method to retrieve the average payload size for a topic

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `topic` | string | Topic to retrieve the average payload size for
  `start` | int | Point in time in which to begin the query (epoch timestamp)
  `stop` | int | Point in time in which to end the query (epoch timestamp)
  `callback` | function |

  Source:
    - ClearBlade.js, line 2279

  ##### Example

      cb.MessagingStats().getEventList(filter, function(err, body) {
         if(err) {
             //handle error
         } else {
             console.log(body);
         }
      });

#### getEventTotals(topic, start, stop, callback)

  Method to retrieve the average payload size for a topic

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `topic` | string | Topic to retrieve the average payload size for
  `start` | int | Point in time in which to begin the query (epoch timestamp)
  `stop` | int | Point in time in which to end the query (epoch timestamp)
  `callback` | function |

  Source:
    - ClearBlade.js, line 2308

  ##### Example

      cb.MessagingStats().getEventTotals(filter, function(err, body) {
         if(err) {
             //handle error
         } else {
             console.log(body);
         }
      });

#### getStorage(topic, start, stop, callback)

  Method to retrieve the average payload size for a topic

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `topic` | string | Topic to retrieve the average payload size for
  `start` | int | Point in time in which to begin the query (epoch timestamp)
  `stop` | int | Point in time in which to end the query (epoch timestamp)
  `callback` | function |

  Source:
    - ClearBlade.js, line 2221

  ##### Example

      cb.MessagingStats().getStorage(filter, function(err, body) {
         if(err) {
             //handle error
         } else {
             console.log(body);
         }
      });

#### getUserEvents(topic, start, stop, callback)

  Method to retrieve the average payload size for a topic

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `topic` | string | Topic to retrieve the average payload size for
  `start` | int | Point in time in which to begin the query (epoch timestamp)
  `stop` | int | Point in time in which to end the query (epoch timestamp)
  `callback` | function |

  Source:
    - ClearBlade.js, line 2337

  ##### Example

      cb.MessagingStats().getUserEvents(filter, function(err, body) {
         if(err) {
             //handle error
         } else {
             console.log(body);
         }
      });