class Ctrl::Trello
Public Class Methods
new()
click to toggle source
# File lib/ctrl/api.rb, line 6 def initialize @key = ::CONFIG["key"] @token = ::CONFIG["token"] end
Public Instance Methods
delete(path, options = {})
click to toggle source
# File lib/ctrl/api.rb, line 26 def delete(path, options = {}) options.merge!({key: @key, token: @token}) self.class.delete(path, options) end
get(path, data, options = {})
click to toggle source
# File lib/ctrl/api.rb, line 11 def get(path, data, options = {}) options.merge!({query: data, key: @key, token: @token}) self.class.get(path + "?key=#{@key}&token=#{@token}", options) end
post(path, data, options = {})
click to toggle source
# File lib/ctrl/api.rb, line 16 def post(path, data, options = {}) options.merge!({query: data, key: @key, token: @token}) self.class.post(path, options) end
put(path, data, options = {})
click to toggle source
# File lib/ctrl/api.rb, line 21 def put(path, data, options = {}) options.merge!({query: data, key: @key, token: @token}) self.class.put(path, options) end