@zigbang/honeyfarm-dashboard
Version:
HoneyFarm Node에 등록 되어 있는 안드로이드 단말을 웹페이지에서 실시간으로 확인 및 사용 할수 있도록 구현된 웹
1 lines • 902 B
JSON
{"ast":null,"code":"function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport axios from \"axios\";\nexport default class api {\n constructor(host) {\n _defineProperty(this, \"host\", \"http://localhost:4723\");\n\n this.host = host ? host : this.host;\n this.host = \"http://honeyfarm.zigbang.io\";\n }\n\n async getDevices() {\n try {\n const result = await axios.get(`${this.host}/devices`, {\n headers: {\n 'Accept': '*/*',\n 'Content-Type': 'application/json'\n },\n params: {\n all: true\n }\n });\n return result;\n } catch (e) {\n console.error(e);\n return undefined;\n }\n }\n\n}","map":null,"metadata":{},"sourceType":"module"}