Class: Graphs

Inherits:
Base
  • Object
show all
Defined in:
lib/zapix/proxies/graphs.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Base

Instance Method Details

#get_all_graph_ids_for(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/zapix/proxies/graphs.rb', line 4

def get_all_graph_ids_for(options)
  graphs_with_names_and_ids = []
  graphs = client.graph_get(options)

  graphs.each do |g|
    graphs_with_names_and_ids <<
      {
        'name' => g['name'],
        'id' => g['graphid']
      }
  end

  graphs_with_names_and_ids
end