In[]:=
req=HTTPRequest["https://api.github.com/search/repositories?page="<>ToString[1]<>"&q=coronavirus",<|"Headers"{"Authorization""token "<>token}|>]
Out[]=
HTTPRequest
URL:
https://api.github.com/search/repositories?page=1&q=coronavirus
ContentType: None

In[]:=
response=URLRead[req]
Out[]=
HTTPResponse
Status: OK
Content type: application/json;charset=utf-8

In[]:=
ImportByteArray[response["BodyByteArray"],"RawJSON"]
In[]:=
i=1;​​more=True;​​result={};​​While[more,​​Pause[1];​​Echo[i];​​search=URLRead[HTTPRequest["https://api.github.com/search/repositories?page="<>ToString[i]<>"&q=coronavirus",<|"Headers"{"Authorization""token "<>token}|>]];​​json=ImportByteArray[search["BodyByteArray"],"RawJSON"];​​Echo[Length[json]];​​If[Length[json]=!=3,Abort[]];​​AppendTo[result,json["items"]];​​If[Length[json["items"]]>0,Null,more=False];​​i++​​];
»
1
»
3
»
2
»
3
»
3
»
3
»
4
»
3
»
5
»
3
»
6
»
3
»
7
»
3
»
8
»
3
»
9
»
3
»
10
»
3
»
11
»
3
»
12
»
3
»
13
»
3
»
14
»
3
In[]:=
14×30
Out[]=
420
In[]:=
420-30
Out[]=
390
In[]:=
Length[Flatten[result]]
Out[]=
386
In[]:=
ds=Dataset[Map[<|"name"#["name"],"owner"#["owner"]["login"]|>&,Flatten[result]]]
Out[]=
name
owner
2019-wuhan-coronavirus-data
globalcitizen
ncov
nextstrain
nCov2019
GuangchuangYu
nCovMemory
2019ncovmemory
coronavirus
JohnCoene
Novel-Coronavirus-Updates
839Studio
choropleth
ncovis
2019-ncov-frontend
sorxrob
coronatracker-analytics
docligot
Coronavirus-Epidemic-2019-nCov
YiranJing
coronavirus-analysis
AaronWard
coronavirus
hysios
2020-new-coronavirus-live-map
lbj96347
2019-ncov-api
sorxrob
wuhan
chrism0dwk
coronavirus
dreamerjackson
ncov_incubation
HopkinsIDD
CoronaV_Challenge
widscommunityorg
artic-ncov2019
artic-network
wuhan-coronavirus-outbreak
vilaca
rows 1–20 of 386
In[]:=
gettags[assoc_]:=Module[{repo,owner,url,tags},​​repo=assoc["name"];​​owner=assoc["owner"];​​Echo[url=URL["https://api.github.com/repos/"<>owner<>"/"<>repo<>"/topics"]];​​tags=URLRead[HTTPRequest[url,<|"Headers"{"Accept""application/vnd.github.mercy-preview+json","Authorization""token "<>token}|>]];​​tags=ImportByteArray[tags["BodyByteArray"],"RawJSON"];​​<|"owner"owner,"repo"repo,"tags"tags["names"]|>​​]
In[]:=
Map[gettags,Take[ds,3]]
»
URL
https://api.github.com/repos/globalcitizen/2019-wuhan-coronavirus-data/topics

»
URL
https://api.github.com/repos/nextstrain/ncov/topics

»
URL
https://api.github.com/repos/GuangchuangYu/nCov2019/topics

Out[]=
owner
repo
tags
globalcitizen
2019-wuhan-coronavirus-data
{
…
11
}
nextstrain
ncov
{}
GuangchuangYu
nCov2019
{}
In[]:=
result2=Map[gettags,ds];
»
URL
https://api.github.com/repos/globalcitizen/2019-wuhan-coronavirus-data/topics

»
URL
https://api.github.com/repos/nextstrain/ncov/topics

»
URL
https://api.github.com/repos/GuangchuangYu/nCov2019/topics

»
URL
https://api.github.com/repos/2019ncovmemory/nCovMemory/topics

»
URL
https://api.github.com/repos/JohnCoene/coronavirus/topics

»
URL
https://api.github.com/repos/839Studio/Novel-Coronavirus-Updates/topics
