Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zoholib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gems
zoholib
Commits
a44b9b10
Commit
a44b9b10
authored
Apr 19, 2022
by
Chantal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow choosing the project import date
parent
d08be82b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
adamo_client.rb
lib/zoholib/adamo_client.rb
+29
-6
version.rb
lib/zoholib/version.rb
+1
-1
No files found.
lib/zoholib/adamo_client.rb
View file @
a44b9b10
...
...
@@ -89,17 +89,16 @@ module Wedoops
end
def
projects
def
projects
(
date
=
nil
)
page
=
1
limit
=
50000
#date=Date.today.prev_day.strftime("%Y%m%d")
date
=
Date
.
parse
(
"01-01-2011"
).
strftime
(
"%Y%m%d"
)
date
=
Date
.
today
.
prev_day
.
strftime
(
"%Y%m%d"
)
if
date
.
nil?
date
=
Date
.
parse
(
date
).
strftime
(
"%Y%m%d"
)
unless
date
.
nil?
resultado_final
=
Array
.
new
r
=
Array
.
new
loop
do
print
"
#{
page
}
"
#&date=#{date}
url
=
"https://coverage-dump.adamo.es/v1/cobertura-project/
#{
page
}
?limit=
#{
limit
}
"
print
"
#{
page
}
"
url
=
"https://coverage-dump.adamo.es/v1/cobertura-project/
#{
page
}
?limit=
#{
limit
}
&date=
#{
date
}
"
#.use(logging: {logger: @logger})
resultado
=
HTTP
.
timeout
(
connect:
15
,
read:
30
)
.
headers
(
"cache-control"
=>
"no-cache"
,
...
...
@@ -116,6 +115,30 @@ module Wedoops
return
resultado_final
end
def
all_projects
page
=
1
limit
=
50000
resultado_final
=
Array
.
new
r
=
Array
.
new
loop
do
print
"
#{
page
}
"
url
=
"https://coverage-dump.adamo.es/v1/cobertura-project/
#{
page
}
?limit=
#{
limit
}
"
#.use(logging: {logger: @logger})
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
)
r
=
JSON
.
parse
(
resultado
,
symbolize_names:
true
)
resultado_final
.
concat
(
r
)
page
+=
1
print
"(
#{
r
.
size
}
/
#{
resultado_final
.
size
}
),"
break
if
r
.
size
<
limit
end
puts
resultado_final
.
size
return
resultado_final
end
def
leads
(
date
=
"01-01-2011"
)
page
=
1
limit
=
50000
...
...
lib/zoholib/version.rb
View file @
a44b9b10
# frozen_string_literal: true
module
Wedoops
module
Zoholib
VERSION
=
'0.
6
.0'
VERSION
=
'0.
7
.0'
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment