lib/bamboozled/base.rb in bamboozled-0.1.0 vs lib/bamboozled/base.rb in bamboozled-0.2.0
- old
+ new
@@ -1,25 +1,31 @@
module Bamboozled
class Base
attr_reader :request
- def initialize(subdomain: nil, api_key: nil)
- @subdomain, @api_key = subdomain, api_key
+ def initialize(subdomain: nil, api_key: nil, httparty_options: {})
+ @subdomain, @api_key = subdomain
+ @api_key = api_key
+ @httparty_options = httparty_options
end
def employee
- @employee ||= Bamboozled::API::Employee.new(@subdomain, @api_key)
+ @employee ||= Bamboozled::API::Employee.new(@subdomain, @api_key, @httparty_options)
end
def report
- @report ||= Bamboozled::API::Report.new(@subdomain, @api_key)
+ @report ||= Bamboozled::API::Report.new(@subdomain, @api_key, @httparty_options)
end
def meta
- @meta ||= Bamboozled::API::Meta.new(@subdomain, @api_key)
+ @meta ||= Bamboozled::API::Meta.new(@subdomain, @api_key, @httparty_options)
end
def time_off
- @time_off ||= Bamboozled::API::TimeOff.new(@subdomain, @api_key)
+ @time_off ||= Bamboozled::API::TimeOff.new(@subdomain, @api_key, @httparty_options)
+ end
+
+ def time_tracking
+ @time_tracking ||= Bamboozled::API::TimeTracking.new(@subdomain, @api_key, @httparty_options)
end
end
end