GA
API & MCPDoiciméadúchán

Ardán Forbróra Mariner GPS Tools

Ríomh treo-uillinn fhíor thosaigh

Ríomh treo-uillinn thosaigh idir dhá phointe

Comhéadain

POST
críochphointe REST/api/v1/bearing
MCP
Ainm uirlisecalculate_bearing

Iarratas

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/bearing \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "from": {
    "lat": 50.1,
    "lng": -4.2
  },
  "to": {
    "lat": 49.8,
    "lng": -3.1
  }
}'
Comhlacht iarrataisjson
{
  "from": {
    "lat": 50.1,
    "lng": -4.2
  },
  "to": {
    "lat": 49.8,
    "lng": -3.1
  }
}

Freagra

Fillteann REST an toradh ríofa sa chlúdach caighdeánach rathúlachta. Tugann MCP na sonraí ríofa céanna ar ais agus aschur uirlisí struchtúrtha.

JSON
{
  "ok": true,
  "data": {
    "degrees": 112.54786806700503,
    "compass": "ESE"
  }
}

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": {
    "from": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lat": {
          "type": "string",
          "description": "Latitude as decimal degrees or a coordinate string such as 51° 30′ 26.4″ N."
        },
        "lng": {
          "type": "string",
          "description": "Longitude as decimal degrees or a coordinate string such as 0° 07′ 39″ W."
        }
      },
      "required": [
        "lat",
        "lng"
      ]
    },
    "to": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lat": {
          "type": "string",
          "description": "Latitude as decimal degrees or a coordinate string such as 51° 30′ 26.4″ N."
        },
        "lng": {
          "type": "string",
          "description": "Longitude as decimal degrees or a coordinate string such as 0° 07′ 39″ W."
        }
      },
      "required": [
        "lat",
        "lng"
      ]
    }
  },
  "required": [
    "from",
    "to"
  ]
}

Scéimre aschuir

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "degrees": {
      "type": "number"
    },
    "compass": {
      "type": "string"
    }
  },
  "required": [
    "degrees",
    "compass"
  ]
}
Doiciméid API & MCP