class GetLeankitBoard
Public Class Methods
api()
click to toggle source
# File lib/assets/get_leankit_board.rb, line 43 def api begin LeankitConnect.api end end
errors(response,status)
click to toggle source
# File lib/assets/get_leankit_board.rb, line 21 def errors(response,status) $stderr.puts "Leankit connection failed response:#{response}, status:#{status}" # rescue LoadError => e # puts " this is EXPECTION #{e}" # raise response "failed response:#{response}, status:#{status}" end
get(id)
click to toggle source
# File lib/assets/get_leankit_board.rb, line 4 def get(id) response, status = get_json(id) status == 200 ? response : errors(response,status) # "#{response}, #{status}" =begin unless status == 200 puts "ERROR in the application #{status}" #"@responseview = #{status}" " #{response}, #{status}" end =end end
get_json(id)
click to toggle source
# File lib/assets/get_leankit_board.rb, line 31 def get_json(id) url = "#{Settings.boardurl}#{id}" uri = URI(url) response = api.get(uri) #[JSON.parse(response.body), response.status] puts "STATUS==#{response.status}" puts "BODY==#{response.body}" puts "THIS IS SETTING== #{Settings.userid}, #{Settings.password}" [response.body , response.status] end