Ardán Gníomhairí agus API Mariner GPS Tools
Tiontaigh luasanna
Tiontaigh idir muirmhílte san uair, mílte san uair, ciliméadair san uair, méadair sa soicind agus troigh sa soicind.
Comhéadain
POST
Críochphointe REST
/api/v1/speed/convertMCP
Ainm uirlise
convert_speedIarratas
Seol an t-iarratas mar JSON. Pasann cliaint MCP na réimsí céanna le hargóintí uirlisí.
cURLshell
curl -X POST https://marinergps.tools/api/v1/speed/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"value": 12,
"from": "kn",
"to": "kmh"
}'Comhlacht iarrataisjson
{
"value": 12,
"from": "kn",
"to": "kmh"
}Freagra
Fillteann REST an toradh ríofa sa chlúdach caighdeánach rathúlachta. Tugann MCP na sonraí ríofa céanna ar ais mar aschur struchtúrtha uirlise.
JSON
{
"ok": true,
"data": {
"input": {
"value": 12,
"from": "kn",
"to": "kmh"
},
"conversions": {
"kn": 12,
"mph": 13.80935337628251,
"kmh": 22.224,
"ms": 6.173333333333334,
"fts": 20.253718285214347
},
"result": 22.224
}
}{
"ok": false,
"error": {
"code": "invalid_request",
"message": "Invalid request input."
}
}Scéimeanna
Léiríonn na sainmhínithe thíos Scéimre JSON iomlán a úsáidtear chun ionchuir a bhailíochtú agus chun cur síos a dhéanamh ar aschuir.
Scéimre ionchuir
{
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "number",
"description": "Speed value to convert."
},
"from": {
"type": "string",
"enum": [
"kn",
"mph",
"kmh",
"ms",
"fts"
],
"description": "Input speed unit."
},
"to": {
"type": "string",
"enum": [
"kn",
"mph",
"kmh",
"ms",
"fts"
],
"description": "Optional target unit. When omitted, all units are returned."
}
},
"required": [
"value",
"from"
]
}Scéimre aschuir
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "number"
},
"from": {
"type": "string",
"enum": [
"kn",
"mph",
"kmh",
"ms",
"fts"
]
},
"to": {
"type": "string",
"enum": [
"kn",
"mph",
"kmh",
"ms",
"fts"
]
}
},
"required": [
"value",
"from"
]
},
"conversions": {
"type": "object",
"additionalProperties": false,
"properties": {
"kn": {
"type": "number"
},
"mph": {
"type": "number"
},
"kmh": {
"type": "number"
},
"ms": {
"type": "number"
},
"fts": {
"type": "number"
}
},
"required": [
"kn",
"mph",
"kmh",
"ms",
"fts"
]
},
"result": {
"type": "number",
"description": "Target-unit result when a target unit is supplied."
}
},
"required": [
"input",
"conversions"
]
}