Commit c6cb25c4 authored by Sergio Guerrero's avatar Sergio Guerrero

V1.1: Added method cobertura_from_date_pager

parent 0ca695bf
...@@ -88,6 +88,21 @@ module Wedoops ...@@ -88,6 +88,21 @@ module Wedoops
return resultado_final return resultado_final
end end
def cobertura_from_date_pager(date="01-01-2011", page=1, limit=50000)
date=Date.parse(date).strftime("%Y%m%d")
resultado_final=Array.new
url = "https://coverage-dump.adamo.es/v1/cobertura/#{page}?limit=#{limit}&date=#{date}"
resultado = HTTP.timeout(connect: 15, read: 30)
.headers(
"cache-control" => "no-cache",
"accept" => "application/json",
"postman-token" => "8b126eb1-0de6-4a10-d78d-1fb417fb23b0",
"x-apikey" => "zYkWN38SYH6hr2Ixq75xvDENl6hrYOvxx0FxLvPD7BUe6"
)
.get(url)
resultado_final = JSON.parse(resultado, symbolize_names: true)
return resultado_final
end
def projects(date=nil) def projects(date=nil)
page=1 page=1
......
# frozen_string_literal: true # frozen_string_literal: true
module Wedoops module Wedoops
module Zoholib module Zoholib
VERSION = '1.0' VERSION = '1.1'
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment