Class: Howard::TrainTrackerGateway

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/howard/train_tracker_gateway.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ TrainTrackerGateway

Returns a new instance of TrainTrackerGateway.



8
9
10
# File 'lib/howard/train_tracker_gateway.rb', line 8

def initialize(api_key)
  self.class.default_params(key: api_key)
end

Instance Method Details

#arrivals(params) ⇒ Object



12
13
14
# File 'lib/howard/train_tracker_gateway.rb', line 12

def arrivals(params)
  self.class.get("/api/1.0/ttarrivals.aspx", params)
end