zbx 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +7 -0
  2. data/lib/zbx/api.rb +0 -3
  3. data/lib/zbx/version.rb +1 -1
  4. metadata +1 -1
data/README.md CHANGED
@@ -37,6 +37,13 @@ ZBX::API.new username, password, api_url do
37
37
  end
38
38
 
39
39
  ZBX::API.new(username, password, api_url).host.get hostids: 10160
40
+
41
+ ZBX::API.new do
42
+ api_url! api_url
43
+ username! user
44
+ password! password
45
+ host.get hostids: 10160
46
+ end
40
47
  ```
41
48
 
42
49
  ## Contributing
@@ -23,17 +23,14 @@ module ZBX
23
23
  def username! username
24
24
  @user, @auth = username, nil
25
25
  end
26
- alias_method :username=, :username!
27
26
 
28
27
  def password! password
29
28
  @pass, @auth = password, nil
30
29
  end
31
- alias_method :password=, :password!
32
30
 
33
31
  def api_url! api_url
34
32
  @api_url, @auth = api_url, nil
35
33
  end
36
- alias_method :api_url=, :api_url!
37
34
 
38
35
  def request method, params={}
39
36
  # in any api request except `user.login`
@@ -1,3 +1,3 @@
1
1
  module ZBX
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zbx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: