Class: Datahen::Client::EnvVar
  
  
  
  
  
    - Inherits:
- 
      Base
      
        
          - Object
- Base
- Datahen::Client::EnvVar
 show all
    - Defined in:
- lib/datahen/client/env_var.rb
 
  Constant Summary
  
  Constants inherited
     from Base
  Base::CHECK_EMPTY_BODY, Base::CHECK_NIL, Base::DEFAULT_RETRY_LIMIT
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods inherited from Base
  #auth_token, #auth_token=, #default_retry_limit, #env_api_url, env_auth_token, env_ignore_ssl, #ignore_ssl, #initialize, #left_merge, random_delay, #retry
  
  
    Instance Method Details
    
      
  
  
    #all(opts = {})  ⇒ Object 
  
  
  
  
    | 
9
10
11
12 | # File 'lib/datahen/client/env_var.rb', line 9
def all(opts={})
  params = @options.merge opts
  self.class.get("/env_vars", params)
end | 
 
    
      
  
  
    #find(name)  ⇒ Object 
  
  
  
  
    | 
5
6
7 | # File 'lib/datahen/client/env_var.rb', line 5
def find(name)
  self.class.get("/env_vars/#{name}", @options)
end | 
 
    
      
  
  
    #set(name, value, opts = {})  ⇒ Object 
  
  
  
  
    | 
14
15
16
17
18
19
20 | # File 'lib/datahen/client/env_var.rb', line 14
def set(name, value, opts={})
  body = {}
  body[:value] = value
  body[:secret] = opts[:secret] if opts[:secret]
  params = @options.merge({body: body.to_json})
  self.class.put("/env_vars/#{name}", params)
end | 
 
    
      
  
  
    #unset(name, opts = {})  ⇒ Object 
  
  
  
  
    | 
22
23
24
25 | # File 'lib/datahen/client/env_var.rb', line 22
def unset(name, opts={})
  params = @options.merge(opts)
  self.class.delete("/env_vars/#{name}", params)
end |