Class: Zt::RemoteAPI::ZeroTierAPI
- Inherits:
-
Object
- Object
- Zt::RemoteAPI::ZeroTierAPI
- Includes:
- HTTParty
- Defined in:
- lib/zt/remote_api.rb
Instance Method Summary collapse
-
#initialize ⇒ ZeroTierAPI
constructor
A new instance of ZeroTierAPI.
- #network_members(network_id) ⇒ Object
- #networks ⇒ Object
Constructor Details
#initialize ⇒ ZeroTierAPI
Returns a new instance of ZeroTierAPI.
13 14 15 16 17 18 19 20 21 |
# File 'lib/zt/remote_api.rb', line 13 def initialize @ztc = Zt::Conf.instance.conf # noinspection RubyStringKeysInHashInspection @req_opts = { headers: { 'Authorization' => "Bearer #{@ztc.zt['token']}" } } end |
Instance Method Details
#network_members(network_id) ⇒ Object
27 28 29 |
# File 'lib/zt/remote_api.rb', line 27 def network_members(network_id) get_parsed("/network/#{network_id}/member") end |
#networks ⇒ Object
23 24 25 |
# File 'lib/zt/remote_api.rb', line 23 def networks get_parsed('/network') end |