Esempio n. 1
0
    Channel().UpdateChannelSection(UpdateChannelInfo)


def PostInsertVideo(UploadVideo):
    print(os.path.dirname(os.path.abspath(__file__)))
    return Video().UploadVideo(UploadVideo), 200


def DeleteVideo(VideoToDelete):
    Video().videos_delete(id=VideoToDelete["id"])


def PostUploadComment(Comment):
    Comment().uploadComment(Comment)


logging.basicConfig(level=logging.INFO)
app = connexion.App(__name__)
app.add_api('swagger.yaml')
application = app.app
if __name__ == '__main__':
    get_authenticated_service()
    config = Cm().config['SwagerConnection']
    app.run(port=int(config['port']), server='gevent')


def absoluteFilePaths(directory):
    for dirpath, _, filenames in os.walk(directory):
        for f in filenames:
            yield os.path.abspath(os.path.join(dirpath, f))
Esempio n. 2
0
 def __init__(self):
     self.client = get_authenticated_service()