Class: Diplomat::Members

Inherits:
RestClient show all
Defined in:
lib/diplomat/members.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RestClient

#initialize

Constructor Details

This class inherits a constructor from Diplomat::RestClient

Class Method Details

.getObject

Note:

This is sugar, see (#get)



15
16
17
# File 'lib/diplomat/members.rb', line 15

def self.get
  Diplomat::Members.new.get
end

Instance Method Details

#getOpenStruct

Get all members

Returns:

  • (OpenStruct)

    all data associated with the service



9
10
11
12
# File 'lib/diplomat/members.rb', line 9

def get
  ret = @conn.get "/v1/agent/members"
  return JSON.parse(ret.body)
end