Class: Zype::Analytics

Inherits:
BaseModel show all
Defined in:
lib/zype/models/analytics.rb

Overview

This class only supports stream_hours Read more at docs.zype.com/v1.0/reference#stream-hours

Since:

  • 0.20.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client, #path

Instance Method Summary collapse

Methods inherited from BaseModel

#all, #auth=, #create, #delete, #find, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#stream_hours(params: {}) ⇒ Hash

Returns all objects for given class

Examples:

params object might look like:

params = {
  filters: {
    start_date_gte: "2018-08-12 10:00",
    start_date_lte: "2018-08-13"
  },
  group_by: ['video_id']
  },
  view_mode: 'detailed'
}
# Return value
{
  "data" => []
}

Parameters:

  • params (Hash) (defaults to: {})

    the metadata to filter objects by

Returns:

  • (Hash)

    “data” will be the key, pointing to an array

Since:

  • 0.20.0



26
27
28
# File 'lib/zype/models/analytics.rb', line 26

def stream_hours(params: {})
  client.execute(method: :get, path: '/stream_hours', params: params)
end