-
Notifications
You must be signed in to change notification settings - Fork 0
API Design
Owen Buckley edited this page Nov 17, 2018
·
3 revisions
To support the Contributary UI and fetching topology / GitHub information, some backend APIs will be developed to support the frontend.
For more information on the backend architecture, check out the Technical Architecture docs.
A simple GET request to return the available topologies and hierarchies.
(see the Topology docs for more info on the structure of the data)
curl http://www.contributary.community/api/topology
{"isBase64Encoded":false,"statusCode":200,"headers":{},"body":{"language":{"c":{"label":"C","projects":[{"name":"Git","type":"org","repositories":["*"]},{"name":"Torvalds","type":"user","repositories":[{"name":"linux"}]}]},"go":{"label":"Go","projects":[{"name":"Docker","type":"org","repositories":["*"]}]},"java":{"label":"Java","projects":[{"name":"JenkinsCI","type":"org","repositories":["*"]},{"name":"KenzanLabs","type":"org","repositories":["*"]},{"name":"Netflix","type":"org","repositories":["*"]}]},"javascript":{"label":"JavaScript","projects":[{"name":"Babel","type":"org","repositories":["*"]},{"name":"ContributaryCommunity","type":"org","repositories":["*"]},{"name":"DevelopIt","type":"user","repositories":["*"]},{"name":"Facebook","type":"org","repositories":["*"]},{"name":"jamiebuilds","type":"user","repositories":["*"]},{"name":"Microsoft","type":"org","repositories":["*"]},{"name":"NodeJS","type":"org","repositories":["*"]},{"name":"npm","type":"org","repositories":["*"]},{"name":"PayPal","type":"org","repositories":["*"]},{"name":"Polymer","type":"org","repositories":["*"]},{"name":"ProjectEvergreen","type":"org","repositories":["*"]},{"name":"ProvidenceGeeks","type":"org","repositories":["*"]},{"name":"TheGreenhouseIO","type":"org","repositories":["*"]},{"name":"thescientist13","type":"user","repositories":[{"name":"github-dashboard"}]},{"name":"VueJS","type":"org","repositories":["*"]},{"name":"webpack","type":"org","repositories":["*"]},{"name":"YarnPkg","type":"org","repositories":["*"]}]},"php":{"label":"PHP","projects":[{"name":"composer","type":"org","repositories":["*"]},{"name":"laravel","type":"org","repositories":["*"]}]}}}}This is only a proxy to the GitHub API but right now supports searching by repositories and issues via GET.
https://developer.github.com/v3/repos/#get
$ curl -v 'http://www.contributary.mmunity/api/github/issues?projectName=ContributaryCommunity&repoName=www.contributary.community'https://developer.github.com/v3/issues/
curl -v 'http://www.contributary.community/api/github/issues?projectName=ContributaryCommunity&repoName=www.contributary.community'