Skip to content

Commit

Permalink
add routes for 'license_declared'
Browse files Browse the repository at this point in the history
Signed-off-by: Parth Sharma <parth261297@gmail.com>
  • Loading branch information
parthsharma2 committed Jun 20, 2019
1 parent 6e4b92e commit 1115e25
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions augur/datasources/augur_db/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,3 +788,39 @@ def downloaded_repos():
]
"""
server.addRepoMetric(augur_db.languages, 'languages')

"""
@api {get} /repo-groups/:repo_group_id/license-declared License Declared
@apiName license-declared
@apiGroup Risk
@apiDescription <a href="https://github.com/chaoss/wg-risk/blob/master/focus-areas/licensing.md">CHAOSS Metric Definition</a>
@apiParam {String} repo_group_id Repository Group ID
@apiSuccessExample {json} Success-Response:
[
{
"repo_id": 21277,
"license": "Apache-2.0"
},
{
"repo_id": 21252,
"license": "Apache-2.0"
}
]
"""
server.addRepoGroupMetric(augur_db.license_declared, 'license-declared')

"""
@api {get} /repo-groups/:repo_group_id/license-declared License Declared
@apiName license-declared
@apiGroup Risk
@apiDescription <a href="https://github.com/chaoss/wg-risk/blob/master/focus-areas/licensing.md">CHAOSS Metric Definition</a>
@apiParam {String} repo_group_id Repository Group ID.
@apiParma {String} repo_id Repository ID.
@apiSuccessExample {json} Success-Response:
[
{
"license": "Apache-2.0"
}
]
"""
server.addRepoMetric(augur_db.license_declared, 'license-declared')

0 comments on commit 1115e25

Please sign in to comment.