def get(self): self._authenticate() track_account_activity(self.db, self.device_id) params = dict(self.request.args) params["appid"] = self.wolfram_alpha_key params["output"] = "json" response = requests.get(self.wolfram_alpha_url + "/v2/query", params=params) return response.json(), response.status_code
def post(self): self._authenticate() self._get_account() self._check_for_open_dataset_agreement() self._write_flac_audio_file() stt_response = self._call_google_stt() response = self._build_response(stt_response) self._write_stt_result_file(response) if response: track_account_activity(self.db, self.device_id) return response, HTTPStatus.OK
def post(self, device_id, metric): self._authenticate(device_id) self._add_core_metric(metric) track_account_activity(self.db, self.device_id) return "", HTTPStatus.NO_CONTENT
def get(self): self._authenticate() track_account_activity(self.db, self.device_id) return self._query_wolfram_alpha()
def get(self, path): self._authenticate() track_account_activity(self.db, self.device_id) return self._get_weather(path)