mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
Fix custom usage script summaries (#3129)
Co-authored-by: Zihao Han <hanhan3344@users.noreply.github.com>
This commit is contained in:
@@ -176,18 +176,18 @@ Interval for automatically refreshing usage data (minutes):
|
||||
|
||||
## Extractor Return Format
|
||||
|
||||
The extractor function must return an object containing the following fields:
|
||||
The extractor function returns an object containing the following fields. All fields are optional:
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `isValid` | boolean | No | Whether the account is valid, defaults to true |
|
||||
| `invalidMessage` | string | No | Message when invalid |
|
||||
| `remaining` | number | Yes | Remaining balance |
|
||||
| `unit` | string | Yes | Unit (e.g., USD, CNY, times) |
|
||||
| `remaining` | number | No | Remaining balance |
|
||||
| `unit` | string | No | Unit (e.g., USD, CNY, times) |
|
||||
| `planName` | string | No | Plan name (supports multi-plan) |
|
||||
| `total` | number | No | Total balance |
|
||||
| `used` | number | No | Used amount |
|
||||
| `extra` | object | No | Additional information |
|
||||
| `extra` | string | No | Additional display text |
|
||||
|
||||
## Test Script
|
||||
|
||||
|
||||
Reference in New Issue
Block a user