Microservices that fetches GitHub data from certain npm & bower packages.
Built with Node, Hapi, and Redis. Hosted on Heroku. Monitored on New Relic.
Note: This API is not versioned and may be changed at any moment. Use at your own risk.
- Fetches
/packages. - Requests GitHub API for each repo.
- Filters unnecessary keys from each JSON entry.
- Saves result data into Redis.
curl -X PUT fetch.customelements.io/repos- Gets data from Redis based on the operation above.
curl -X GET fetch.customelements.io/repos{
"22607013": {
id: 2274210,
name: "dtreemap",
owner: "ibm-js",
description: "TreeMap Custom Element",
created_at: "2011-08-26T13:32:32Z",
pushed_at: "2015-05-05T11:36:27Z",
stargazers_count: 9,
forks_count: 8
},
{...}
}- Fetches
/packages/bower. - Fetches
/packages/npm. - Aggregates packages that contains the same GitHub repo.
- Merges the two arrays.
- Saves result data into Redis.
curl -X PUT fetch.customelements.io/packages- Gets data from Redis based on the operation above.
curl -X GET fetch.customelements.io/packages{
"kentaromiura/custom-element": {
"bower": {
"name": "custom-element",
"keywords": ["web-components"]
},
"npm": {
"name": "declarative-custom-element",
"keywords": ["web-components"]
}
},
{...}
}- Fetches all packages from Bower that contains the
web-componentskeywords. - Filters unnecessary keys from each JSON entry.
- Saves result data into Redis.
curl -X PUT fetch.customelements.io/packages/bower- Gets data from Redis based on the operation above.
curl -X GET fetch.customelements.io/packages/bower{
"zenorocha/voice-elements": {
"bower": {
"name": "voice-elements",
"keywords": ["web-components"]
}
},
{...}
}- Fetches all packages from npm that contains the
web-componentskeywords. - Fetches each package metadata.
- Filters unnecessary keys from each JSON entry.
- Saves result data into Redis.
curl -X PUT fetch.customelements.io/packages/npm- Gets data from Redis based on the operation above.
curl -X GET fetch.customelements.io/packages/npm{
"jorgecasar/input-password": {
"npm": {
"name": "input-password",
"keywords": ["web-components"]
}
},
{...}
}Returns GitHub's API current rate limit.
curl -X GET fetch.customelements.io/limit{
"limit": 5000,
"remaining": 5000,
"reset": 1427122269
}MIT License © WebComponents.org
