__init__.py 3.39 KB
Newer Older
1 2 3
'''
Author: your name
Date: 2021-07-15 03:22:19
4
LastEditTime: 2021-07-20 10:07:12
5 6 7 8 9 10
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \evm-store\tools\build_out\views\__init__.py
'''
#!/usr/bin/env python
# -*- coding: utf_8 -*-
wanli's avatar
wanli committed
11 12 13 14

from flask import Blueprint
from flask_restful import Api
from . import area
15
from . import openapi
wanli's avatar
wanli committed
16 17 18 19
from . import app
from . import package
from . import user
from . import login
wanli's avatar
wanli committed
20 21
from . import device
from . import annex
22
from . import file
wanli's avatar
wanli committed
23 24 25 26 27
from . import monitorWatch
from . import monitorSystem
from . import monitorLvgl
from . import monitorImage
from . import monitorEvm
wanli's avatar
wanli committed
28 29 30 31 32 33 34 35 36 37 38 39

api_v1 = Blueprint('api_v1', __name__)

api = Api(api_v1)


api.add_resource(area.AreaResource, '/area/<string:uuid>')
api.add_resource(area.AreaResourceList, '/area')

api.add_resource(app.AppResource, '/app/<string:uuid>')
api.add_resource(app.AppResourceList, '/app')

40
api.add_resource(openapi.AppReviewResource, '/api/app-review')
41 42
api.add_resource(openapi.CStringToolResource, '/api/convert-to-c-string')
api.add_resource(openapi.BuildAppResource, '/evm_store/application/build')
43 44 45 46 47
api.add_resource(openapi.App, '/api/app')
api.add_resource(openapi.AppInfo, '/api/app-info')
api.add_resource(openapi.LauncherResource, '/api/app-launcher')
api.add_resource(openapi.AppListResource, '/api/app-list')
api.add_resource(openapi.DownloadEpk, '/api/download-epk')
48

wanli's avatar
wanli committed
49 50 51 52 53 54 55 56
api.add_resource(package.PackageResource, '/package/<string:uuid>')
api.add_resource(package.PackageResourceList, '/package')

api.add_resource(user.UserResource, '/user/<string:uuid>')
api.add_resource(user.UserResourceList, '/user')

api.add_resource(login.LoginResource, '/login/<string:uuid>')
api.add_resource(login.LoginResourceList, '/login')
wanli's avatar
wanli committed
57 58 59 60 61 62 63

api.add_resource(device.DeviceResource, '/device/<string:uuid>')
api.add_resource(device.DeviceResourceList, '/device')

api.add_resource(annex.AnnexResource, '/annex/<string:uuid>')
api.add_resource(annex.AnnexResourceList, '/annex')

64 65
api.add_resource(file.FileInit, "/file-manager/initialize")
api.add_resource(file.FileContent, "/file-manager/content")
66
api.add_resource(file.FileDisk, "/file-manager/select-disk")
67
api.add_resource(file.FileTree, "/file-manager/tree")
68 69
api.add_resource(file.FileUpdate, "/file-manager/update-file")
api.add_resource(file.FileUpload, "/file-manager/upload")
70 71
api.add_resource(file.FileDownload, "/file-manager/download")
api.add_resource(file.FilePrview, "/file-manager/preview")
72 73 74 75
api.add_resource(file.FileCreateDir, "/file-manager/create-directory")
api.add_resource(file.FileCreate, "/file-manager/create-file")
api.add_resource(file.FilePaste, "/file-manager/paste")
api.add_resource(file.FileDelete, "/file-manager/delete")
76

wanli's avatar
wanli committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90
api.add_resource(monitorWatch.MonitorWatchResource, '/monitorWatch/<string:uuid>')
api.add_resource(monitorWatch.MonitorWatchResourceList, '/monitorWatch')

api.add_resource(monitorSystem.MonitorSystemResource, '/monitorSystem/<string:uuid>')
api.add_resource(monitorSystem.MonitorSystemResourceList, '/monitorSystem')

api.add_resource(monitorLvgl.MonitorLvglResource, '/monitorLvgl/<string:uuid>')
api.add_resource(monitorLvgl.MonitorLvglResourceList, '/monitorLvgl')

api.add_resource(monitorImage.MonitorImageResource, '/monitorImage/<string:uuid>')
api.add_resource(monitorImage.MonitorImageResourceList, '/monitorImage')

api.add_resource(monitorEvm.MonitorEvmResource, '/monitorEvm/<string:uuid>')
api.add_resource(monitorEvm.MonitorEvmResourceList, '/monitorEvm')