Loading...
Loading...
Shared Base for Aike Smart Parking Open Platform (openydt) CLI: First-time use of openydt, profile configuration, signature (v2/v3) and multi-environment (test/dev/prod) setup, response envelope and status code/business code handling, exit codes, rate limiting and retry, write operation security rules. Triggered when users first use openydt, configure/switch profiles, handle signature or environment issues, interpret status/resultCode, encounter rate limiting or authentication failures, or before performing any parking lot write operations. All openydt domain skills should read this base first.
npx skill4agent add xiaowen-0725/openydt-cli openydt-sharedopenydtopenydt~/.config/openydt-cli/config.jsonXDG_CONFIG_HOME# Add or update an authorizer profile (start here for first-time use)
openydt config set --profile demo --key test --secret 123456 --env test --sign v2
# List all profiles (secret is desensitized), the one with * is the current profile
openydt config list
# Switch current profile
openydt config use demo
# Print configuration file path
openydt config path--profile / --key / --secretconfig set--envtest--signv2config set| Variable | Description |
|---|---|
| Select profile name |
| Override key |
| Override secret |
| Override environment test|dev|prod |
| Override signature version v2|v3 |
OPENYDT_KEYOPENYDT_SECRET| Flag | Description |
|---|---|
| Specify authorizer profile (defaults to current profile) |
| Specify environment (defaults to test) |
| Output format (defaults to json) |
| Signature version (defaults to profile setting, otherwise v2) |
| Confirm write operation execution |
| Only print the signed request to be sent, do not actually send it |
| Output debug information to stderr |
https://openapi-test.yidianting.com.cnhttps://openapi-dev.yidianting.xinhttps://open.yidianting.xingetAuthParkCodesopenydt auth test✓ Authentication passed (status=1)POST {base}/openydt/api/v3/{cmd}?sign={sign}Authorization: base64(key:ts)tsyyyyMMddHHmmss| Version | Algorithm | Description |
|---|---|---|
| v2(default) | | Does not include body; available by default in test environment |
| v3 | | Includes compacted body |
--sign v3"2019-04-16 00:11:25"openydt <domain> <command>openydt park get-auth-park-codesopenydt parking <subcommand>blacklist coupon data device park parking redlist ticket trade visitoropenydt api <cmd> --body '{...}'openydt api getParkFee --body '{"carCode":"粤EJW962"}'
openydt api getAuthParkCodes
echo '{"parkCode":"PTD2YBBZ"}' | openydt api getParkOnSiteCar --body-file ---body--body-file--body-file -{"data":..., "message":"...", "resultCode":N, "status":N}status| status | Meaning |
|---|---|
| 1 | Business success |
| 2 | Business failure (check resultCode) |
| 3 | System exception |
| 4 | Signature error |
| 5 | Key error |
| 6 | Unauthorized |
| 7 | Incomplete request parameters |
status == 2resultCodeinternal/client/codes.go| resultCode | Meaning |
|---|---|
| 901 | System exception occurred |
| 902 | Remote server did not respond |
| 903 | Operator does not exist |
| 904 | Parking lot does not exist |
| 905 | No on-site vehicle found |
| 906 | Bill does not exist |
| 907 | Bill has been synchronized |
| 908 | Other errors |
| 909 | Request parameter error |
| 910 | No parking lot found under the authorizer |
| 911 | No permission to operate this parking lot |
| 912 | Fee inquiry timed out, please retry |
| 1801 | Specified vehicle not found |
| Exit Code | Meaning |
|---|---|
| 0 | Success(status=1) |
| 1 | Business failure(status=2 or other non-success status) |
| 2 | Parameter error(usage error) |
| 4 | Authentication failure(status=4 signature /5 key /6 unauthorized) |
| 5 | Network/transmission failure |
--yes--yes--dry-run--dry-runconfig listtestprod| parkCode | Purpose |
|---|---|
| Fee inquiry available, matching test license plate |
| Has historical data, suitable for querying records / on-site vehicles |
openydt api getParkFee --body '{"parkCode":"1ZS7H5PQH9","carCode":"粤EJW962"}'
openydt api getParkOnSiteCar --body '{"parkCode":"PTD2YBBZ"}'