Skip to content

Commit

Permalink
Remove requirement to use a key for W3C API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dontcallmedom committed Jul 31, 2023
1 parent 82459dc commit fc70689
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This tool collects data from various sources (W3C API, Github API, screen-scraping of W3C mailing lists archives, RSS feeds, wikis) to build a picture of the activity level in W3C Community Groups.

# Data collection
You need to instantiate a `config.json` (from the `config.json.dist` template), filled with a W3C API key and a Github API key.
You need to instantiate a `config.json` (from the `config.json.dist` template), filled with a Github API key.

Once that done, run:
`node monitor.js`
Expand Down
1 change: 0 additions & 1 deletion config.json.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"w3capikey": "",
"ghapitoken": ""
}
3 changes: 0 additions & 3 deletions monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const queue = new RequestQueue()
if (url.href.match(/https:\/\/api\.github\.com\//)) {
headers.push(['Authorization', 'token ' + config.ghapitoken]);
}
if (url.href.match(/https:\/\/api\.w3\.org\//)) {
headers.push(['Authorization', 'W3C-API apikey="' + config.w3capikey + '"']);
}
_fetch(url, { headers }).then(r => Promise.all([Promise.resolve(r.status), Promise.resolve(r.headers), r.text()]))
.then(([status, headers, body]) => {
done();
Expand Down

0 comments on commit fc70689

Please sign in to comment.