Class: PlatformSdk::OpsGenie::Client
- Inherits:
 - 
      Object
      
        
- Object
 - PlatformSdk::OpsGenie::Client
 
 
- Defined in:
 - lib/platform_sdk/ops_genie/client.rb
 
Overview
Client for OpsGenie API
Constant Summary collapse
- OPSGENIE_API_URL =
 "https://api.opsgenie.com"
Instance Attribute Summary collapse
- 
  
    
      #connection  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute connection.
 
Instance Method Summary collapse
- #heartbeat(heartbeat_name) ⇒ Object
 - 
  
    
      #initialize(opsgenie_secret, conn = nil)  ⇒ Client 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Client.
 
Constructor Details
#initialize(opsgenie_secret, conn = nil) ⇒ Client
Returns a new instance of Client.
      11 12 13 14 15  | 
    
      # File 'lib/platform_sdk/ops_genie/client.rb', line 11 def initialize(opsgenie_secret, conn = nil) raise ArgumentError, "opsgenie_secret cannot be nil" unless opsgenie_secret @connection = conn || build_connection(opsgenie_secret) end  | 
  
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
      7 8 9  | 
    
      # File 'lib/platform_sdk/ops_genie/client.rb', line 7 def connection @connection end  | 
  
Instance Method Details
#heartbeat(heartbeat_name) ⇒ Object
      17 18 19  | 
    
      # File 'lib/platform_sdk/ops_genie/client.rb', line 17 def heartbeat(heartbeat_name) connection.get("v2/heartbeats/#{heartbeat_name}/ping") end  |