zabbixapi 0.5.1b6 → 0.5.1b7

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ class ZabbixApi
23
23
 
24
24
  dump = {}
25
25
  item_id = data[key.to_sym].to_i
26
- get_full_data(indentify.to_sym => data[indentify.to_sym]).each do |item|
26
+ dump_by_id(key.to_sym => data[key.to_sym]).each do |item|
27
27
  dump = symbolize_keys(item) if item[key].to_i == data[key.to_sym].to_i
28
28
  end
29
29
 
@@ -48,6 +48,18 @@ class ZabbixApi
48
48
  )
49
49
  end
50
50
 
51
+ def dump_by_id(data)
52
+ @client.api_request(
53
+ :method => "#{method_name}.get",
54
+ :params => {
55
+ :filter => {
56
+ key.to_sym => data[key.to_sym]
57
+ },
58
+ :output => "extend"
59
+ }
60
+ )
61
+ end
62
+
51
63
  def all
52
64
  result = {}
53
65
  @client.api_request(:method => "#{method_name}.get", :params => {:output => "extend"}).each do |item|
@@ -1,3 +1,3 @@
1
1
  class ZabbixApi
2
- VERSION = "0.5.1b6"
2
+ VERSION = "0.5.1b7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbixapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1b6
4
+ version: 0.5.1b7
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
63
  version: '0'
64
64
  segments:
65
65
  - 0
66
- hash: 703548098159490039
66
+ hash: 2549650011715709632
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements: