lib/chatwork.rb in chatwork-0.2.0 vs lib/chatwork.rb in chatwork-0.3.0

- old
+ new

@@ -19,11 +19,11 @@ @api_version = '/v1' @api_key = nil class << self def client - @client ||= Client.new(@api_key, @api_base, @api_version) + @client ||= Client.new(api_key, api_base, api_version) end def api_base=(new_value) @api_base = new_value @client = nil @@ -37,9 +37,13 @@ def api_base @api_base end def api_key - @api_key + @api_key || ENV['CHATWORK_API_TOKEN'] + end + + def api_version + @api_version end end end