2020-02-23 16:22:13 +00:00
|
|
|
from . import Controller
|
|
|
|
from owrx.feature import FeatureDetector
|
2020-05-10 15:27:46 +00:00
|
|
|
from owrx.details import ReceiverDetails
|
2020-02-23 16:22:13 +00:00
|
|
|
import json
|
|
|
|
|
|
|
|
|
|
|
|
class ApiController(Controller):
|
2020-02-23 17:32:37 +00:00
|
|
|
def indexAction(self):
|
2020-02-23 16:22:13 +00:00
|
|
|
data = json.dumps(FeatureDetector().feature_report())
|
|
|
|
self.send_response(data, content_type="application/json")
|
2020-05-10 15:12:42 +00:00
|
|
|
|
|
|
|
def receiverDetails(self):
|
2020-05-10 15:27:46 +00:00
|
|
|
receiver_details = ReceiverDetails()
|
2020-05-10 15:12:42 +00:00
|
|
|
data = json.dumps(receiver_details.__dict__())
|
|
|
|
self.send_response(data, content_type="application/json")
|