def get_app_or_404(app_id): heroku = get_heroku_client_for_session() try: app = heroku.apps()[app_id] except KeyError: abort(404, message="App {} doesn't exist".format(app_id)) return app
def get_app(self, app_id): heroku = utils.get_heroku_client_for_session() try: app = heroku.apps()[app_id] except KeyError: raise NotFoundError('app', app_id) return app
def get_app_or_404(app_id): heroku = get_heroku_client_for_session() try: app = heroku.apps()[app_id] except KeyError: abort(404, message="App {} doesn't exist".format(app_id)) return app
def get_app(self, app_id): heroku = utils.get_heroku_client_for_session() try: app = heroku.apps()[app_id] except KeyError: raise NotFoundError('app', app_id) return app
def app(app_id): heroku = utils.get_heroku_client_for_session() apps = heroku.apps() # getto permissions check if app_id not in apps: raise NotFoundError('app', app_id) app = models.App.query.filter_by(id=app_id).first() if not app: app = apps[app_id] return AppSchema().jsonify(app)
def app(app_id): heroku = utils.get_heroku_client_for_session() apps = heroku.apps() # getto permissions check if app_id not in apps: raise NotFoundError('app', app_id) app = models.App.query.filter_by(id=app_id).first() if not app: app = apps[app_id] return AppSchema().jsonify(app)
def get(self, app_id): heroku = get_heroku_client_for_session() apps = heroku.apps() # getto permissions check if app_id not in apps: abort(404, message="App {} doesn't exist".format(app_id)) app = models.App.query.filter_by(id=app_id).first() if app: checks = {c.dynotype: str(c.id) for c in app.checks} else: app = apps[app_id] checks = {} return { 'name': app.name, 'id': app_id, 'checks': checks, }
def get(self, app_id): heroku = get_heroku_client_for_session() apps = heroku.apps() # getto permissions check if app_id not in apps: abort(404, message="App {} doesn't exist".format(app_id)) app = models.App.query.filter_by(id=app_id).first() if app: checks = {c.dynotype: str(c.id) for c in app.checks} else: app = apps[app_id] checks = {} return { 'name': app.name, 'id': app_id, 'checks': checks, }
def get(self): heroku = get_heroku_client_for_session() return {a.name: a.id for a in heroku.apps()}
def get(self): heroku = get_heroku_client_for_session() return {a.name: a.id for a in heroku.apps()}
def apps(): heroku = utils.get_heroku_client_for_session() apps = heroku.apps() return jsonify({'apps': AppSchema(many=True).dump(apps).data})
def apps(): heroku = utils.get_heroku_client_for_session() apps = heroku.apps() return jsonify({'apps': AppSchema(many=True).dump(apps).data})