mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 16:54:25 +08:00
add server version command
This commit is contained in:
+20
-3
@@ -485,6 +485,23 @@ $API_CONFIGS = @(
|
|||||||
"}"
|
"}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@{
|
||||||
|
Name = "server-version"
|
||||||
|
Description = "Get ezBookkeeping server version information"
|
||||||
|
Method = "GET"
|
||||||
|
Path = "systems/version.json"
|
||||||
|
RequiresTimezone = $false
|
||||||
|
RequiredParams = @()
|
||||||
|
OptionalParams = @()
|
||||||
|
ParamTypes = @{}
|
||||||
|
ParamDescriptions = @{}
|
||||||
|
ResponseStructure = @(
|
||||||
|
"{"
|
||||||
|
" `"version`": `"string (Server version)`","
|
||||||
|
" `"commitHash`": `"string (Git commit hash)`""
|
||||||
|
"}"
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Reference: https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml
|
# Reference: https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml
|
||||||
@@ -837,10 +854,10 @@ function Show-Help {
|
|||||||
Write-Host " ebktools.ps1 list"
|
Write-Host " ebktools.ps1 list"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host " # Show help for a specific command"
|
Write-Host " # Show help for a specific command"
|
||||||
Write-Host " ebktools.ps1 help transactions-add"
|
Write-Host " ebktools.ps1 help server-version"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host " # Call accounts-list API"
|
Write-Host " # Call server-version API"
|
||||||
Write-Host " ebktools.ps1 accounts-list"
|
Write-Host " ebktools.ps1 server-version"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host " # Call API with timezone name"
|
Write-Host " # Call API with timezone name"
|
||||||
Write-Host " ebktools.ps1 -tzName $exampleTimezoneName transactions-list -count 10"
|
Write-Host " ebktools.ps1 -tzName $exampleTimezoneName transactions-list -count 10"
|
||||||
|
|||||||
+20
-3
@@ -470,6 +470,23 @@ API_CONFIGS='[
|
|||||||
" ]",
|
" ]",
|
||||||
"}"
|
"}"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "server-version",
|
||||||
|
"Description": "Get ezBookkeeping server version information",
|
||||||
|
"Method": "GET",
|
||||||
|
"Path": "systems/version.json",
|
||||||
|
"RequiresTimezone": false,
|
||||||
|
"RequiredParams": [],
|
||||||
|
"OptionalParams": [],
|
||||||
|
"ParamTypes": {},
|
||||||
|
"ParamDescriptions": {},
|
||||||
|
"ResponseStructure": [
|
||||||
|
"{",
|
||||||
|
" \"version\": \"string (Server version)\",",
|
||||||
|
" \"commitHash\": \"string (Git commit hash)\"",
|
||||||
|
"}"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]'
|
]'
|
||||||
|
|
||||||
@@ -593,10 +610,10 @@ Examples:
|
|||||||
ebktools.sh list
|
ebktools.sh list
|
||||||
|
|
||||||
# Show help for a specific command
|
# Show help for a specific command
|
||||||
ebktools.sh help transactions-add
|
ebktools.sh help server-version
|
||||||
|
|
||||||
# Call accounts-list API
|
# Call server-version API
|
||||||
ebktools.sh accounts-list
|
ebktools.sh server-version
|
||||||
|
|
||||||
# Call API with timezone name
|
# Call API with timezone name
|
||||||
ebktools.sh --tz-name ${example_timezone_name} transactions-list --count 10
|
ebktools.sh --tz-name ${example_timezone_name} transactions-list --count 10
|
||||||
|
|||||||
Reference in New Issue
Block a user