MaxSem has submitted this change and it was merged.

Change subject: reportupdater queries for EventLogging
......................................................................


reportupdater queries for EventLogging

TBD at a later time:
* Which wikis to record separately, so far only total aggregate is
  listed.

Bug: T147034
Change-Id: I7456a914f66ddb4b85b6af697a0b797a196e8763
---
M .gitignore
A interactive/config.yaml
A interactive/events.sql
A interactive/sitematrix.yaml
A interactive/wikis.txt
M src/Api.php
A update-wiki-list.php
7 files changed, 971 insertions(+), 7 deletions(-)

Approvals:
  MaxSem: Verified
  Yurik: Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index d1502b0..a12459c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 vendor/
 composer.lock
+
+*.swp
diff --git a/interactive/config.yaml b/interactive/config.yaml
new file mode 100644
index 0000000..d1fc991
--- /dev/null
+++ b/interactive/config.yaml
@@ -0,0 +1,33 @@
+databases:
+    el:
+        host: "analytics-store.eqiad.wmnet"
+        port: 3306
+        creds_file: /a/.my.cnf.research
+        db: log
+    el-dev:
+        host: localhost
+        port: 3307
+        creds_file: ~/.my.cnf.research
+        db: log
+
+graphite:
+    host: graphite.eqiad.wmnet
+    port: 2003
+    lookups:
+        wiki: sitematrix.yaml
+
+defaults:
+    db: el
+
+reports:
+
+    events:
+        granularity: days
+        funnel: true
+        starts: 2016-11-04
+        explode_by:
+            wiki: wikis.txt
+        graphite:
+            path: "{_metric}.{action}.{feature}.{wiki}"
+            metrics:
+                "daily.kartographer.events": events
diff --git a/interactive/events.sql b/interactive/events.sql
new file mode 100644
index 0000000..e915b15
--- /dev/null
+++ b/interactive/events.sql
@@ -0,0 +1,18 @@
+SELECT
+        DATE(timestamp) AS day,
+        event_action AS action,
+        event_feature AS feature,
+        SUM(event_sampling) AS events
+    FROM Kartographer_16010805
+    WHERE
+        ('{wiki}' = 'all' OR wiki = '{wiki}')
+        AND timestamp >= '{from_timestamp}'
+        AND timestamp < '{to_timestamp}'
+        AND event_action IN (
+            'view',
+            'open',
+            'close',
+            'hashopen'
+        )
+    GROUP BY event_action, event_feature
+;
diff --git a/interactive/sitematrix.yaml b/interactive/sitematrix.yaml
new file mode 100644
index 0000000..fad318d
--- /dev/null
+++ b/interactive/sitematrix.yaml
@@ -0,0 +1,902 @@
+all: all
+advisorywiki: special.advisory
+arwikimedia: special.arwikimedia
+arbcom_dewiki: special.arbcom-de
+arbcom_enwiki: special.arbcom-en
+arbcom_fiwiki: special.arbcom-fi
+arbcom_nlwiki: special.arbcom-nl
+auditcomwiki: special.auditcom
+bdwikimedia: special.bdwikimedia
+bewikimedia: special.bewikimedia
+betawikiversity: special.betawikiversity
+boardwiki: special.board
+boardgovcomwiki: special.boardgovcom
+brwikimedia: special.brwikimedia
+cawikimedia: special.cawikimedia
+chairwiki: special.chair
+chapcomwiki: special.chapcom
+checkuserwiki: special.checkuser
+cnwikimedia: special.cnwikimedia
+cowikimedia: special.cowikimedia
+collabwiki: special.collab
+commonswiki: special.commons
+dkwikimedia: special.dkwikimedia
+donatewiki: special.donate
+ecwikimedia: special.ecwikimedia
+etwikimedia: special.etwikimedia
+execwiki: special.exec
+fdcwiki: special.fdc
+fiwikimedia: special.fiwikimedia
+foundationwiki: special.foundation
+grantswiki: special.grants
+iegcomwiki: special.iegcom
+ilwikimedia: special.ilwikimedia
+incubatorwiki: special.incubator
+internalwiki: special.internal
+labswiki: special.labs
+labtestwiki: special.labtest
+legalteamwiki: special.legalteam
+loginwiki: special.login
+mediawikiwiki: special.mediawiki
+metawiki: special.meta
+mkwikimedia: special.mkwikimedia
+movementroleswiki: special.movementroles
+mxwikimedia: special.mxwikimedia
+nlwikimedia: special.nlwikimedia
+nowikimedia: special.nowikimedia
+noboard_chapterswikimedia: special.noboard-chapterswikimedia
+nostalgiawiki: special.nostalgia
+nycwikimedia: special.nycwikimedia
+nzwikimedia: special.nzwikimedia
+officewiki: special.office
+ombudsmenwiki: special.ombudsmen
+otrs_wikiwiki: special.otrs-wiki
+outreachwiki: special.outreach
+pa_uswikimedia: special.pa-uswikimedia
+plwikimedia: special.plwikimedia
+projectcomwiki: special.projectcom
+qualitywiki: special.quality
+rswikimedia: special.rswikimedia
+ruwikimedia: special.ruwikimedia
+sewikimedia: special.sewikimedia
+searchcomwiki: special.searchcom
+sourceswiki: special.sources
+spcomwiki: special.spcom
+specieswiki: special.species
+stewardwiki: special.steward
+strategywiki: special.strategy
+tenwiki: special.ten
+testwiki: special.test
+test2wiki: special.test2
+testwikidatawiki: special.testwikidata
+trwikimedia: special.trwikimedia
+transitionteamwiki: special.transitionteam
+uawikimedia: special.uawikimedia
+ukwikimedia: special.ukwikimedia
+usabilitywiki: special.usability
+votewiki: special.vote
+wg_enwiki: special.wg-en
+wikidatawiki: special.wikidata
+wikimania2005wiki: special.wikimania2005
+wikimania2006wiki: special.wikimania2006
+wikimania2007wiki: special.wikimania2007
+wikimania2008wiki: special.wikimania2008
+wikimania2009wiki: special.wikimania2009
+wikimania2010wiki: special.wikimania2010
+wikimania2011wiki: special.wikimania2011
+wikimania2012wiki: special.wikimania2012
+wikimania2013wiki: special.wikimania2013
+wikimania2014wiki: special.wikimania2014
+wikimania2015wiki: special.wikimania2015
+wikimania2016wiki: special.wikimania2016
+wikimania2017wiki: special.wikimania2017
+wikimaniateamwiki: special.wikimaniateam
+zerowiki: special.zero
+aawiki: wiki.aa
+aawiktionary: wiktionary.aa
+aawikibooks: wikibooks.aa
+abwiki: wiki.ab
+abwiktionary: wiktionary.ab
+acewiki: wiki.ace
+adywiki: wiki.ady
+afwiki: wiki.af
+afwiktionary: wiktionary.af
+afwikibooks: wikibooks.af
+afwikiquote: wikiquote.af
+akwiki: wiki.ak
+akwiktionary: wiktionary.ak
+akwikibooks: wikibooks.ak
+alswiki: wiki.als
+alswiktionary: wiktionary.als
+alswikibooks: wikibooks.als
+alswikiquote: wikiquote.als
+amwiki: wiki.am
+amwiktionary: wiktionary.am
+amwikiquote: wikiquote.am
+anwiki: wiki.an
+anwiktionary: wiktionary.an
+angwiki: wiki.ang
+angwiktionary: wiktionary.ang
+angwikibooks: wikibooks.ang
+angwikiquote: wikiquote.ang
+angwikisource: wikisource.ang
+arwiki: wiki.ar
+arwiktionary: wiktionary.ar
+arwikibooks: wikibooks.ar
+arwikinews: wikinews.ar
+arwikiquote: wikiquote.ar
+arwikisource: wikisource.ar
+arwikiversity: wikiversity.ar
+arcwiki: wiki.arc
+arzwiki: wiki.arz
+aswiki: wiki.as
+aswiktionary: wiktionary.as
+aswikibooks: wikibooks.as
+aswikisource: wikisource.as
+astwiki: wiki.ast
+astwiktionary: wiktionary.ast
+astwikibooks: wikibooks.ast
+astwikiquote: wikiquote.ast
+avwiki: wiki.av
+avwiktionary: wiktionary.av
+aywiki: wiki.ay
+aywiktionary: wiktionary.ay
+aywikibooks: wikibooks.ay
+azwiki: wiki.az
+azwiktionary: wiktionary.az
+azwikibooks: wikibooks.az
+azwikiquote: wikiquote.az
+azwikisource: wikisource.az
+azbwiki: wiki.azb
+bawiki: wiki.ba
+bawikibooks: wikibooks.ba
+barwiki: wiki.bar
+bat_smgwiki: wiki.bat-smg
+bclwiki: wiki.bcl
+bewiki: wiki.be
+bewiktionary: wiktionary.be
+bewikibooks: wikibooks.be
+bewikiquote: wikiquote.be
+bewikisource: wikisource.be
+be_x_oldwiki: wiki.be-x-old
+bgwiki: wiki.bg
+bgwiktionary: wiktionary.bg
+bgwikibooks: wikibooks.bg
+bgwikinews: wikinews.bg
+bgwikiquote: wikiquote.bg
+bgwikisource: wikisource.bg
+bhwiki: wiki.bh
+bhwiktionary: wiktionary.bh
+biwiki: wiki.bi
+biwiktionary: wiktionary.bi
+biwikibooks: wikibooks.bi
+bjnwiki: wiki.bjn
+bmwiki: wiki.bm
+bmwiktionary: wiktionary.bm
+bmwikibooks: wikibooks.bm
+bmwikiquote: wikiquote.bm
+bnwiki: wiki.bn
+bnwiktionary: wiktionary.bn
+bnwikibooks: wikibooks.bn
+bnwikisource: wikisource.bn
+bowiki: wiki.bo
+bowiktionary: wiktionary.bo
+bowikibooks: wikibooks.bo
+bpywiki: wiki.bpy
+brwiki: wiki.br
+brwiktionary: wiktionary.br
+brwikiquote: wikiquote.br
+brwikisource: wikisource.br
+bswiki: wiki.bs
+bswiktionary: wiktionary.bs
+bswikibooks: wikibooks.bs
+bswikinews: wikinews.bs
+bswikiquote: wikiquote.bs
+bswikisource: wikisource.bs
+bugwiki: wiki.bug
+bxrwiki: wiki.bxr
+cawiki: wiki.ca
+cawiktionary: wiktionary.ca
+cawikibooks: wikibooks.ca
+cawikinews: wikinews.ca
+cawikiquote: wikiquote.ca
+cawikisource: wikisource.ca
+cbk_zamwiki: wiki.cbk-zam
+cdowiki: wiki.cdo
+cewiki: wiki.ce
+cebwiki: wiki.ceb
+chwiki: wiki.ch
+chwiktionary: wiktionary.ch
+chwikibooks: wikibooks.ch
+chowiki: wiki.cho
+chrwiki: wiki.chr
+chrwiktionary: wiktionary.chr
+chywiki: wiki.chy
+ckbwiki: wiki.ckb
+cowiki: wiki.co
+cowiktionary: wiktionary.co
+cowikibooks: wikibooks.co
+cowikiquote: wikiquote.co
+crwiki: wiki.cr
+crwiktionary: wiktionary.cr
+crwikiquote: wikiquote.cr
+crhwiki: wiki.crh
+cswiki: wiki.cs
+cswiktionary: wiktionary.cs
+cswikibooks: wikibooks.cs
+cswikinews: wikinews.cs
+cswikiquote: wikiquote.cs
+cswikisource: wikisource.cs
+cswikiversity: wikiversity.cs
+csbwiki: wiki.csb
+csbwiktionary: wiktionary.csb
+cuwiki: wiki.cu
+cvwiki: wiki.cv
+cvwikibooks: wikibooks.cv
+cywiki: wiki.cy
+cywiktionary: wiktionary.cy
+cywikibooks: wikibooks.cy
+cywikiquote: wikiquote.cy
+cywikisource: wikisource.cy
+dawiki: wiki.da
+dawiktionary: wiktionary.da
+dawikibooks: wikibooks.da
+dawikiquote: wikiquote.da
+dawikisource: wikisource.da
+dewiki: wiki.de
+dewiktionary: wiktionary.de
+dewikibooks: wikibooks.de
+dewikinews: wikinews.de
+dewikiquote: wikiquote.de
+dewikisource: wikisource.de
+dewikiversity: wikiversity.de
+dewikivoyage: wikivoyage.de
+diqwiki: wiki.diq
+dsbwiki: wiki.dsb
+dvwiki: wiki.dv
+dvwiktionary: wiktionary.dv
+dzwiki: wiki.dz
+dzwiktionary: wiktionary.dz
+eewiki: wiki.ee
+elwiki: wiki.el
+elwiktionary: wiktionary.el
+elwikibooks: wikibooks.el
+elwikinews: wikinews.el
+elwikiquote: wikiquote.el
+elwikisource: wikisource.el
+elwikiversity: wikiversity.el
+elwikivoyage: wikivoyage.el
+emlwiki: wiki.eml
+enwiki: wiki.en
+enwiktionary: wiktionary.en
+enwikibooks: wikibooks.en
+enwikinews: wikinews.en
+enwikiquote: wikiquote.en
+enwikisource: wikisource.en
+enwikiversity: wikiversity.en
+enwikivoyage: wikivoyage.en
+eowiki: wiki.eo
+eowiktionary: wiktionary.eo
+eowikibooks: wikibooks.eo
+eowikinews: wikinews.eo
+eowikiquote: wikiquote.eo
+eowikisource: wikisource.eo
+eswiki: wiki.es
+eswiktionary: wiktionary.es
+eswikibooks: wikibooks.es
+eswikinews: wikinews.es
+eswikiquote: wikiquote.es
+eswikisource: wikisource.es
+eswikiversity: wikiversity.es
+eswikivoyage: wikivoyage.es
+etwiki: wiki.et
+etwiktionary: wiktionary.et
+etwikibooks: wikibooks.et
+etwikiquote: wikiquote.et
+etwikisource: wikisource.et
+euwiki: wiki.eu
+euwiktionary: wiktionary.eu
+euwikibooks: wikibooks.eu
+euwikiquote: wikiquote.eu
+extwiki: wiki.ext
+fawiki: wiki.fa
+fawiktionary: wiktionary.fa
+fawikibooks: wikibooks.fa
+fawikinews: wikinews.fa
+fawikiquote: wikiquote.fa
+fawikisource: wikisource.fa
+fawikivoyage: wikivoyage.fa
+ffwiki: wiki.ff
+fiwiki: wiki.fi
+fiwiktionary: wiktionary.fi
+fiwikibooks: wikibooks.fi
+fiwikinews: wikinews.fi
+fiwikiquote: wikiquote.fi
+fiwikisource: wikisource.fi
+fiwikiversity: wikiversity.fi
+fiwikivoyage: wikivoyage.fi
+fiu_vrowiki: wiki.fiu-vro
+fjwiki: wiki.fj
+fjwiktionary: wiktionary.fj
+fowiki: wiki.fo
+fowiktionary: wiktionary.fo
+fowikisource: wikisource.fo
+frwiki: wiki.fr
+frwiktionary: wiktionary.fr
+frwikibooks: wikibooks.fr
+frwikinews: wikinews.fr
+frwikiquote: wikiquote.fr
+frwikisource: wikisource.fr
+frwikiversity: wikiversity.fr
+frwikivoyage: wikivoyage.fr
+frpwiki: wiki.frp
+frrwiki: wiki.frr
+furwiki: wiki.fur
+fywiki: wiki.fy
+fywiktionary: wiktionary.fy
+fywikibooks: wikibooks.fy
+gawiki: wiki.ga
+gawiktionary: wiktionary.ga
+gawikibooks: wikibooks.ga
+gawikiquote: wikiquote.ga
+gagwiki: wiki.gag
+ganwiki: wiki.gan
+gdwiki: wiki.gd
+gdwiktionary: wiktionary.gd
+glwiki: wiki.gl
+glwiktionary: wiktionary.gl
+glwikibooks: wikibooks.gl
+glwikiquote: wikiquote.gl
+glwikisource: wikisource.gl
+glkwiki: wiki.glk
+gnwiki: wiki.gn
+gnwiktionary: wiktionary.gn
+gnwikibooks: wikibooks.gn
+gomwiki: wiki.gom
+gotwiki: wiki.got
+gotwikibooks: wikibooks.got
+guwiki: wiki.gu
+guwiktionary: wiktionary.gu
+guwikibooks: wikibooks.gu
+guwikiquote: wikiquote.gu
+guwikisource: wikisource.gu
+gvwiki: wiki.gv
+gvwiktionary: wiktionary.gv
+hawiki: wiki.ha
+hawiktionary: wiktionary.ha
+hakwiki: wiki.hak
+hawwiki: wiki.haw
+hewiki: wiki.he
+hewiktionary: wiktionary.he
+hewikibooks: wikibooks.he
+hewikinews: wikinews.he
+hewikiquote: wikiquote.he
+hewikisource: wikisource.he
+hewikivoyage: wikivoyage.he
+hiwiki: wiki.hi
+hiwiktionary: wiktionary.hi
+hiwikibooks: wikibooks.hi
+hiwikiquote: wikiquote.hi
+hifwiki: wiki.hif
+howiki: wiki.ho
+hrwiki: wiki.hr
+hrwiktionary: wiktionary.hr
+hrwikibooks: wikibooks.hr
+hrwikiquote: wikiquote.hr
+hrwikisource: wikisource.hr
+hsbwiki: wiki.hsb
+hsbwiktionary: wiktionary.hsb
+htwiki: wiki.ht
+htwikisource: wikisource.ht
+huwiki: wiki.hu
+huwiktionary: wiktionary.hu
+huwikibooks: wikibooks.hu
+huwikinews: wikinews.hu
+huwikiquote: wikiquote.hu
+huwikisource: wikisource.hu
+hywiki: wiki.hy
+hywiktionary: wiktionary.hy
+hywikibooks: wikibooks.hy
+hywikiquote: wikiquote.hy
+hywikisource: wikisource.hy
+hzwiki: wiki.hz
+iawiki: wiki.ia
+iawiktionary: wiktionary.ia
+iawikibooks: wikibooks.ia
+idwiki: wiki.id
+idwiktionary: wiktionary.id
+idwikibooks: wikibooks.id
+idwikiquote: wikiquote.id
+idwikisource: wikisource.id
+iewiki: wiki.ie
+iewiktionary: wiktionary.ie
+iewikibooks: wikibooks.ie
+igwiki: wiki.ig
+iiwiki: wiki.ii
+ikwiki: wiki.ik
+ikwiktionary: wiktionary.ik
+ilowiki: wiki.ilo
+iowiki: wiki.io
+iowiktionary: wiktionary.io
+iswiki: wiki.is
+iswiktionary: wiktionary.is
+iswikibooks: wikibooks.is
+iswikiquote: wikiquote.is
+iswikisource: wikisource.is
+itwiki: wiki.it
+itwiktionary: wiktionary.it
+itwikibooks: wikibooks.it
+itwikinews: wikinews.it
+itwikiquote: wikiquote.it
+itwikisource: wikisource.it
+itwikiversity: wikiversity.it
+itwikivoyage: wikivoyage.it
+iuwiki: wiki.iu
+iuwiktionary: wiktionary.iu
+jawiki: wiki.ja
+jawiktionary: wiktionary.ja
+jawikibooks: wikibooks.ja
+jawikinews: wikinews.ja
+jawikiquote: wikiquote.ja
+jawikisource: wikisource.ja
+jawikiversity: wikiversity.ja
+jamwiki: wiki.jam
+jbowiki: wiki.jbo
+jbowiktionary: wiktionary.jbo
+jvwiki: wiki.jv
+jvwiktionary: wiktionary.jv
+kawiki: wiki.ka
+kawiktionary: wiktionary.ka
+kawikibooks: wikibooks.ka
+kawikiquote: wikiquote.ka
+kaawiki: wiki.kaa
+kabwiki: wiki.kab
+kbdwiki: wiki.kbd
+kgwiki: wiki.kg
+kiwiki: wiki.ki
+kjwiki: wiki.kj
+kkwiki: wiki.kk
+kkwiktionary: wiktionary.kk
+kkwikibooks: wikibooks.kk
+kkwikiquote: wikiquote.kk
+klwiki: wiki.kl
+klwiktionary: wiktionary.kl
+kmwiki: wiki.km
+kmwiktionary: wiktionary.km
+kmwikibooks: wikibooks.km
+knwiki: wiki.kn
+knwiktionary: wiktionary.kn
+knwikibooks: wikibooks.kn
+knwikiquote: wikiquote.kn
+knwikisource: wikisource.kn
+kowiki: wiki.ko
+kowiktionary: wiktionary.ko
+kowikibooks: wikibooks.ko
+kowikinews: wikinews.ko
+kowikiquote: wikiquote.ko
+kowikisource: wikisource.ko
+kowikiversity: wikiversity.ko
+koiwiki: wiki.koi
+krwiki: wiki.kr
+krwikiquote: wikiquote.kr
+krcwiki: wiki.krc
+kswiki: wiki.ks
+kswiktionary: wiktionary.ks
+kswikibooks: wikibooks.ks
+kswikiquote: wikiquote.ks
+kshwiki: wiki.ksh
+kuwiki: wiki.ku
+kuwiktionary: wiktionary.ku
+kuwikibooks: wikibooks.ku
+kuwikiquote: wikiquote.ku
+kvwiki: wiki.kv
+kwwiki: wiki.kw
+kwwiktionary: wiktionary.kw
+kwwikiquote: wikiquote.kw
+kywiki: wiki.ky
+kywiktionary: wiktionary.ky
+kywikibooks: wikibooks.ky
+kywikiquote: wikiquote.ky
+lawiki: wiki.la
+lawiktionary: wiktionary.la
+lawikibooks: wikibooks.la
+lawikiquote: wikiquote.la
+lawikisource: wikisource.la
+ladwiki: wiki.lad
+lbwiki: wiki.lb
+lbwiktionary: wiktionary.lb
+lbwikibooks: wikibooks.lb
+lbwikiquote: wikiquote.lb
+lbewiki: wiki.lbe
+lezwiki: wiki.lez
+lgwiki: wiki.lg
+liwiki: wiki.li
+liwiktionary: wiktionary.li
+liwikibooks: wikibooks.li
+liwikiquote: wikiquote.li
+liwikisource: wikisource.li
+lijwiki: wiki.lij
+lmowiki: wiki.lmo
+lnwiki: wiki.ln
+lnwiktionary: wiktionary.ln
+lnwikibooks: wikibooks.ln
+lowiki: wiki.lo
+lowiktionary: wiktionary.lo
+lrcwiki: wiki.lrc
+ltwiki: wiki.lt
+ltwiktionary: wiktionary.lt
+ltwikibooks: wikibooks.lt
+ltwikiquote: wikiquote.lt
+ltwikisource: wikisource.lt
+ltgwiki: wiki.ltg
+lvwiki: wiki.lv
+lvwiktionary: wiktionary.lv
+lvwikibooks: wikibooks.lv
+maiwiki: wiki.mai
+map_bmswiki: wiki.map-bms
+mdfwiki: wiki.mdf
+mgwiki: wiki.mg
+mgwiktionary: wiktionary.mg
+mgwikibooks: wikibooks.mg
+mhwiki: wiki.mh
+mhwiktionary: wiktionary.mh
+mhrwiki: wiki.mhr
+miwiki: wiki.mi
+miwiktionary: wiktionary.mi
+miwikibooks: wikibooks.mi
+minwiki: wiki.min
+mkwiki: wiki.mk
+mkwiktionary: wiktionary.mk
+mkwikibooks: wikibooks.mk
+mkwikisource: wikisource.mk
+mlwiki: wiki.ml
+mlwiktionary: wiktionary.ml
+mlwikibooks: wikibooks.ml
+mlwikiquote: wikiquote.ml
+mlwikisource: wikisource.ml
+mnwiki: wiki.mn
+mnwiktionary: wiktionary.mn
+mnwikibooks: wikibooks.mn
+mowiki: wiki.mo
+mowiktionary: wiktionary.mo
+mrwiki: wiki.mr
+mrwiktionary: wiktionary.mr
+mrwikibooks: wikibooks.mr
+mrwikiquote: wikiquote.mr
+mrwikisource: wikisource.mr
+mrjwiki: wiki.mrj
+mswiki: wiki.ms
+mswiktionary: wiktionary.ms
+mswikibooks: wikibooks.ms
+mtwiki: wiki.mt
+mtwiktionary: wiktionary.mt
+muswiki: wiki.mus
+mwlwiki: wiki.mwl
+mywiki: wiki.my
+mywiktionary: wiktionary.my
+mywikibooks: wikibooks.my
+myvwiki: wiki.myv
+mznwiki: wiki.mzn
+nawiki: wiki.na
+nawiktionary: wiktionary.na
+nawikibooks: wikibooks.na
+nawikiquote: wikiquote.na
+nahwiki: wiki.nah
+nahwiktionary: wiktionary.nah
+nahwikibooks: wikibooks.nah
+napwiki: wiki.nap
+ndswiki: wiki.nds
+ndswiktionary: wiktionary.nds
+ndswikibooks: wikibooks.nds
+ndswikiquote: wikiquote.nds
+nds_nlwiki: wiki.nds-nl
+newiki: wiki.ne
+newiktionary: wiktionary.ne
+newikibooks: wikibooks.ne
+newwiki: wiki.new
+ngwiki: wiki.ng
+nlwiki: wiki.nl
+nlwiktionary: wiktionary.nl
+nlwikibooks: wikibooks.nl
+nlwikinews: wikinews.nl
+nlwikiquote: wikiquote.nl
+nlwikisource: wikisource.nl
+nlwikivoyage: wikivoyage.nl
+nnwiki: wiki.nn
+nnwiktionary: wiktionary.nn
+nnwikiquote: wikiquote.nn
+nowiki: wiki.no
+nowiktionary: wiktionary.no
+nowikibooks: wikibooks.no
+nowikinews: wikinews.no
+nowikiquote: wikiquote.no
+nowikisource: wikisource.no
+novwiki: wiki.nov
+nrmwiki: wiki.nrm
+nsowiki: wiki.nso
+nvwiki: wiki.nv
+nywiki: wiki.ny
+ocwiki: wiki.oc
+ocwiktionary: wiktionary.oc
+ocwikibooks: wikibooks.oc
+olowiki: wiki.olo
+omwiki: wiki.om
+omwiktionary: wiktionary.om
+orwiki: wiki.or
+orwiktionary: wiktionary.or
+orwikisource: wikisource.or
+oswiki: wiki.os
+pawiki: wiki.pa
+pawiktionary: wiktionary.pa
+pawikibooks: wikibooks.pa
+pagwiki: wiki.pag
+pamwiki: wiki.pam
+papwiki: wiki.pap
+pcdwiki: wiki.pcd
+pdcwiki: wiki.pdc
+pflwiki: wiki.pfl
+piwiki: wiki.pi
+piwiktionary: wiktionary.pi
+pihwiki: wiki.pih
+plwiki: wiki.pl
+plwiktionary: wiktionary.pl
+plwikibooks: wikibooks.pl
+plwikinews: wikinews.pl
+plwikiquote: wikiquote.pl
+plwikisource: wikisource.pl
+plwikivoyage: wikivoyage.pl
+pmswiki: wiki.pms
+pnbwiki: wiki.pnb
+pnbwiktionary: wiktionary.pnb
+pntwiki: wiki.pnt
+pswiki: wiki.ps
+pswiktionary: wiktionary.ps
+pswikibooks: wikibooks.ps
+ptwiki: wiki.pt
+ptwiktionary: wiktionary.pt
+ptwikibooks: wikibooks.pt
+ptwikinews: wikinews.pt
+ptwikiquote: wikiquote.pt
+ptwikisource: wikisource.pt
+ptwikiversity: wikiversity.pt
+ptwikivoyage: wikivoyage.pt
+quwiki: wiki.qu
+quwiktionary: wiktionary.qu
+quwikibooks: wikibooks.qu
+quwikiquote: wikiquote.qu
+rmwiki: wiki.rm
+rmwiktionary: wiktionary.rm
+rmwikibooks: wikibooks.rm
+rmywiki: wiki.rmy
+rnwiki: wiki.rn
+rnwiktionary: wiktionary.rn
+rowiki: wiki.ro
+rowiktionary: wiktionary.ro
+rowikibooks: wikibooks.ro
+rowikinews: wikinews.ro
+rowikiquote: wikiquote.ro
+rowikisource: wikisource.ro
+rowikivoyage: wikivoyage.ro
+roa_rupwiki: wiki.roa-rup
+roa_rupwiktionary: wiktionary.roa-rup
+roa_tarawiki: wiki.roa-tara
+ruwiki: wiki.ru
+ruwiktionary: wiktionary.ru
+ruwikibooks: wikibooks.ru
+ruwikinews: wikinews.ru
+ruwikiquote: wikiquote.ru
+ruwikisource: wikisource.ru
+ruwikiversity: wikiversity.ru
+ruwikivoyage: wikivoyage.ru
+ruewiki: wiki.rue
+rwwiki: wiki.rw
+rwwiktionary: wiktionary.rw
+sawiki: wiki.sa
+sawiktionary: wiktionary.sa
+sawikibooks: wikibooks.sa
+sawikiquote: wikiquote.sa
+sawikisource: wikisource.sa
+sahwiki: wiki.sah
+sahwikisource: wikisource.sah
+scwiki: wiki.sc
+scwiktionary: wiktionary.sc
+scnwiki: wiki.scn
+scnwiktionary: wiktionary.scn
+scowiki: wiki.sco
+sdwiki: wiki.sd
+sdwiktionary: wiktionary.sd
+sdwikinews: wikinews.sd
+sewiki: wiki.se
+sewikibooks: wikibooks.se
+sgwiki: wiki.sg
+sgwiktionary: wiktionary.sg
+shwiki: wiki.sh
+shwiktionary: wiktionary.sh
+siwiki: wiki.si
+siwiktionary: wiktionary.si
+siwikibooks: wikibooks.si
+simplewiki: wiki.simple
+simplewiktionary: wiktionary.simple
+simplewikibooks: wikibooks.simple
+simplewikiquote: wikiquote.simple
+skwiki: wiki.sk
+skwiktionary: wiktionary.sk
+skwikibooks: wikibooks.sk
+skwikiquote: wikiquote.sk
+skwikisource: wikisource.sk
+slwiki: wiki.sl
+slwiktionary: wiktionary.sl
+slwikibooks: wikibooks.sl
+slwikiquote: wikiquote.sl
+slwikisource: wikisource.sl
+slwikiversity: wikiversity.sl
+smwiki: wiki.sm
+smwiktionary: wiktionary.sm
+snwiki: wiki.sn
+snwiktionary: wiktionary.sn
+sowiki: wiki.so
+sowiktionary: wiktionary.so
+sqwiki: wiki.sq
+sqwiktionary: wiktionary.sq
+sqwikibooks: wikibooks.sq
+sqwikinews: wikinews.sq
+sqwikiquote: wikiquote.sq
+srwiki: wiki.sr
+srwiktionary: wiktionary.sr
+srwikibooks: wikibooks.sr
+srwikinews: wikinews.sr
+srwikiquote: wikiquote.sr
+srwikisource: wikisource.sr
+srnwiki: wiki.srn
+sswiki: wiki.ss
+sswiktionary: wiktionary.ss
+stwiki: wiki.st
+stwiktionary: wiktionary.st
+stqwiki: wiki.stq
+suwiki: wiki.su
+suwiktionary: wiktionary.su
+suwikibooks: wikibooks.su
+suwikiquote: wikiquote.su
+svwiki: wiki.sv
+svwiktionary: wiktionary.sv
+svwikibooks: wikibooks.sv
+svwikinews: wikinews.sv
+svwikiquote: wikiquote.sv
+svwikisource: wikisource.sv
+svwikiversity: wikiversity.sv
+svwikivoyage: wikivoyage.sv
+swwiki: wiki.sw
+swwiktionary: wiktionary.sw
+swwikibooks: wikibooks.sw
+szlwiki: wiki.szl
+tawiki: wiki.ta
+tawiktionary: wiktionary.ta
+tawikibooks: wikibooks.ta
+tawikinews: wikinews.ta
+tawikiquote: wikiquote.ta
+tawikisource: wikisource.ta
+tcywiki: wiki.tcy
+tewiki: wiki.te
+tewiktionary: wiktionary.te
+tewikibooks: wikibooks.te
+tewikiquote: wikiquote.te
+tewikisource: wikisource.te
+tetwiki: wiki.tet
+tgwiki: wiki.tg
+tgwiktionary: wiktionary.tg
+tgwikibooks: wikibooks.tg
+thwiki: wiki.th
+thwiktionary: wiktionary.th
+thwikibooks: wikibooks.th
+thwikinews: wikinews.th
+thwikiquote: wikiquote.th
+thwikisource: wikisource.th
+tiwiki: wiki.ti
+tiwiktionary: wiktionary.ti
+tkwiki: wiki.tk
+tkwiktionary: wiktionary.tk
+tkwikibooks: wikibooks.tk
+tkwikiquote: wikiquote.tk
+tlwiki: wiki.tl
+tlwiktionary: wiktionary.tl
+tlwikibooks: wikibooks.tl
+tnwiki: wiki.tn
+tnwiktionary: wiktionary.tn
+towiki: wiki.to
+towiktionary: wiktionary.to
+tpiwiki: wiki.tpi
+tpiwiktionary: wiktionary.tpi
+trwiki: wiki.tr
+trwiktionary: wiktionary.tr
+trwikibooks: wikibooks.tr
+trwikinews: wikinews.tr
+trwikiquote: wikiquote.tr
+trwikisource: wikisource.tr
+tswiki: wiki.ts
+tswiktionary: wiktionary.ts
+ttwiki: wiki.tt
+ttwiktionary: wiktionary.tt
+ttwikibooks: wikibooks.tt
+ttwikiquote: wikiquote.tt
+tumwiki: wiki.tum
+twwiki: wiki.tw
+twwiktionary: wiktionary.tw
+tywiki: wiki.ty
+tyvwiki: wiki.tyv
+udmwiki: wiki.udm
+ugwiki: wiki.ug
+ugwiktionary: wiktionary.ug
+ugwikibooks: wikibooks.ug
+ugwikiquote: wikiquote.ug
+ukwiki: wiki.uk
+ukwiktionary: wiktionary.uk
+ukwikibooks: wikibooks.uk
+ukwikinews: wikinews.uk
+ukwikiquote: wikiquote.uk
+ukwikisource: wikisource.uk
+ukwikivoyage: wikivoyage.uk
+urwiki: wiki.ur
+urwiktionary: wiktionary.ur
+urwikibooks: wikibooks.ur
+urwikiquote: wikiquote.ur
+uzwiki: wiki.uz
+uzwiktionary: wiktionary.uz
+uzwikibooks: wikibooks.uz
+uzwikiquote: wikiquote.uz
+vewiki: wiki.ve
+vecwiki: wiki.vec
+vecwiktionary: wiktionary.vec
+vecwikisource: wikisource.vec
+vepwiki: wiki.vep
+viwiki: wiki.vi
+viwiktionary: wiktionary.vi
+viwikibooks: wikibooks.vi
+viwikiquote: wikiquote.vi
+viwikisource: wikisource.vi
+viwikivoyage: wikivoyage.vi
+vlswiki: wiki.vls
+vowiki: wiki.vo
+vowiktionary: wiktionary.vo
+vowikibooks: wikibooks.vo
+vowikiquote: wikiquote.vo
+wawiki: wiki.wa
+wawiktionary: wiktionary.wa
+wawikibooks: wikibooks.wa
+warwiki: wiki.war
+wowiki: wiki.wo
+wowiktionary: wiktionary.wo
+wowikiquote: wikiquote.wo
+wuuwiki: wiki.wuu
+xalwiki: wiki.xal
+xhwiki: wiki.xh
+xhwiktionary: wiktionary.xh
+xhwikibooks: wikibooks.xh
+xmfwiki: wiki.xmf
+yiwiki: wiki.yi
+yiwiktionary: wiktionary.yi
+yiwikisource: wikisource.yi
+yowiki: wiki.yo
+yowiktionary: wiktionary.yo
+yowikibooks: wikibooks.yo
+zawiki: wiki.za
+zawiktionary: wiktionary.za
+zawikibooks: wikibooks.za
+zawikiquote: wikiquote.za
+zeawiki: wiki.zea
+zhwiki: wiki.zh
+zhwiktionary: wiktionary.zh
+zhwikibooks: wikibooks.zh
+zhwikinews: wikinews.zh
+zhwikiquote: wikiquote.zh
+zhwikisource: wikisource.zh
+zhwikivoyage: wikivoyage.zh
+zh_classicalwiki: wiki.zh-classical
+zh_min_nanwiki: wiki.zh-min-nan
+zh_min_nanwiktionary: wiktionary.zh-min-nan
+zh_min_nanwikibooks: wikibooks.zh-min-nan
+zh_min_nanwikiquote: wikiquote.zh-min-nan
+zh_min_nanwikisource: wikisource.zh-min-nan
+zh_yuewiki: wiki.zh-yue
+zuwiki: wiki.zu
+zuwiktionary: wiktionary.zu
+zuwikibooks: wikibooks.zu
diff --git a/interactive/wikis.txt b/interactive/wikis.txt
new file mode 100644
index 0000000..0702cb5
--- /dev/null
+++ b/interactive/wikis.txt
@@ -0,0 +1 @@
+all
diff --git a/src/Api.php b/src/Api.php
index 18819a6..d65798f 100644
--- a/src/Api.php
+++ b/src/Api.php
@@ -7,13 +7,7 @@
         $params['format'] = 'json';
         $params['formatversion'] = 2;
 
-        $arr = [];
-        foreach ( $params as $key => $value ) {
-            $arr[] = $key . '=' . urlencode( $value );
-        }
-        $paramsStr = implode( '&', $arr );
-
-        return json_decode( file_get_contents( "{$url}/w/api.php?{$paramsStr}" 
) );
+        return json_decode( file_get_contents( "{$url}/w/api.php?" . 
http_build_query( $params ) ) );
     }
 }
 
diff --git a/update-wiki-list.php b/update-wiki-list.php
new file mode 100644
index 0000000..62cedfc
--- /dev/null
+++ b/update-wiki-list.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace DiscoveryStats;
+
+require_once( __DIR__ . '/vendor/autoload.php' );
+
+$matrix = new SiteMatrix();
+
+$file = "all: all\n";
+foreach ( $matrix->getSites() as $dbname => $site ) {
+    $file .= "{$dbname}: {$site->getFamily()}.{$site->getCode()}\n";
+}
+
+file_put_contents( __DIR__ . '/interactive/sitematrix.yaml', $file );

-- 
To view, visit https://gerrit.wikimedia.org/r/322007
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7456a914f66ddb4b85b6af697a0b797a196e8763
Gerrit-PatchSet: 9
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Bearloga <mpo...@wikimedia.org>
Gerrit-Reviewer: Chelsyx <c...@wikimedia.org>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Milimetric <dandree...@wikimedia.org>
Gerrit-Reviewer: Yurik <yu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to