From 30b3c03e36a561f2eff784ea974af671c929bac0 Mon Sep 17 00:00:00 2001 From: JimmyK1m Date: Tue, 3 Mar 2026 15:52:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=BC=A6=E6=95=A6?= =?UTF-8?q?=E7=8E=B0=E8=B4=A7=E9=BB=84=E9=87=91=E4=BB=B7=E6=A0=BC=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/plugins/Gold.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 resources/plugins/Gold.json diff --git a/resources/plugins/Gold.json b/resources/plugins/Gold.json new file mode 100644 index 0000000..8907757 --- /dev/null +++ b/resources/plugins/Gold.json @@ -0,0 +1,29 @@ +{ + "id": "gold_price", + "meta": { + "name": "黄金价格", + "version": "1.0", + "author": "JimmyK1m", + "description": "伦敦现货黄金价格监控" + }, + "execution": { + "type": "api_json", + "url": "https://api.gold-api.com/price/XAU", + "method": "GET", + "extract": { + "price": "price" + }, + "process": [{ + "var": "price_modified", + "source": "price", + "function": "regex_replace", + "pattern": "(\\d+\\.\\d).*", + "to": "$1" + }] + }, + "outputs": [{ + "key": "XAU", + "label": "伦敦黄金", + "format_val": "{{price_modified}}" + }] +}