-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.py
More file actions
31 lines (21 loc) · 665 Bytes
/
app.py
File metadata and controls
31 lines (21 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from flask import Flask
from flask_restplus import Resource, Api
from docker_hub_analytics import retrieve_hub_repo_data
from github_analytics import retrieve_repo_data
from gitter import gitter
app = Flask(__name__)
api = Api(app)
@api.route('/docker_hub')
class DockerHubAnalytics(Resource):
def get(self):
return retrieve_hub_repo_data.get_hub_analytics_json()
@api.route('/github')
class GithubAnalytics(Resource):
def get(self):
return retrieve_repo_data.get_github_meta()
@api.route('/gitter')
class GitterAnalytics(Resource):
def get(self):
return gitter.get_chat_meta()
if __name__ == '__main__':
app.run()