{"files":{"SKILL.md":"---\nname: miataru\ndescription: \"Miataru API skill. Use when working with Miataru for UpdateLocation, GetLocation, GetLocationGeoJSON. Covers 5 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Miataru\nAPI version: 1.0.0\n\n## Auth\nNo authentication required.\n\n## Base URL\nhttp://service.miataru.com/v1\n\n## Setup\n1. No auth setup needed\n2. GET /GetLocationGeoJSON/{deviceID} -- retrieves a devices location in geojson format.\n3. POST /UpdateLocation -- create first UpdateLocation\n\n## Endpoints\n5 endpoints across 5 groups. See references/api-spec.lap for full details.\n\n### UpdateLocation\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /UpdateLocation | This method is used to update the location of a device. The device does not need to be known already to the Miataru server but it rather creates a unique identifier for itself in the client application. This unique identifier, or device ID is then used to address this particular device. |\n\n### GetLocation\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /GetLocation | To retrieve a specific devices latest known location the /GetLocation method is used. Please note that the MiataruConfig portion is optional. RequestMiataruDeviceID should be the ID of the device the request is sent from (or an identifier like an URL). |\n\n### GetLocationGeoJSON\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /GetLocationGeoJSON/{deviceID} | Retrieves a devices Location in GeoJSON format. |\n\n### GetLocationHistory\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /GetLocationHistory | Location History is stored on the server only if the client told the server to do so using the “EnableLocationHistory” setting in the Location Update requests. For transitions of enabling/disabling that functionality - Everytime a Location Update is received by the server with “EnableLocationHistory=false” the server removes all stored Location History till that point. There is a server-side setting that controls up to how many Location Updates the server is storing in the Location History before it removes the oldest one. To request the Location History of a particular device the client sends the following POST request to the GetLocationHistory service URL. Please note that the MiataruConfig portion is optional. RequestMiataruDeviceID should be the ID of the device the request is sent from (or an identifier like an URL). |\n\n### GetVisitorHistory\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /GetVisitorHistory | Visitor History is stored on the server with every request to the location or location history information of a device. There is a server-side setting that controls up to how many Visitors the server is storing in the Visitor History before it removes the oldest one. To request the Visitor History of a particular device the client sends the following POST request to the GetVisitorHistory service URL. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a UpdateLocation?\" -> POST /UpdateLocation\n- \"Create a GetLocation?\" -> POST /GetLocation\n- \"Get GetLocationGeoJSON details?\" -> GET /GetLocationGeoJSON/{deviceID}\n- \"Create a GetLocationHistory?\" -> POST /GetLocationHistory\n- \"Create a GetVisitorHistory?\" -> POST /GetVisitorHistory\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Miataru\n@base http://service.miataru.com/v1\n@version 1.0.0\n@endpoints 5\n@toc UpdateLocation(1), GetLocation(1), GetLocationGeoJSON(1), GetLocationHistory(1), GetVisitorHistory(1)\n\n@group UpdateLocation\n@endpoint POST /UpdateLocation\n@desc This method is used to update the location of a device. The device does not need to be known already to the Miataru server but it rather creates a unique identifier for itself in the client application. This unique identifier, or device ID is then used to address this particular device.\n@required {body: any # the body of this UpdateLocation POST request contains the JSON formatted parameters.}\n\n@endgroup\n\n@group GetLocation\n@endpoint POST /GetLocation\n@desc To retrieve a specific devices latest known location the /GetLocation method is used. Please note that the MiataruConfig portion is optional. RequestMiataruDeviceID should be the ID of the device the request is sent from (or an identifier like an URL).\n@required {body: any # the complex JSON formatted datastructure to get the location of one or more devices.}\n\n@endgroup\n\n@group GetLocationGeoJSON\n@endpoint GET /GetLocationGeoJSON/{deviceID}\n@desc Retrieves a devices Location in GeoJSON format.\n@required {deviceID: any # the unique device ID of the device the location is requested from}\n\n@endgroup\n\n@group GetLocationHistory\n@endpoint POST /GetLocationHistory\n@desc Location History is stored on the server only if the client told the server to do so using the “EnableLocationHistory” setting in the Location Update requests. For transitions of enabling/disabling that functionality - Everytime a Location Update is received by the server with “EnableLocationHistory=false” the server removes all stored Location History till that point. There is a server-side setting that controls up to how many Location Updates the server is storing in the Location History before it removes the oldest one. To request the Location History of a particular device the client sends the following POST request to the GetLocationHistory service URL. Please note that the MiataruConfig portion is optional. RequestMiataruDeviceID should be the ID of the device the request is sent from (or an identifier like an URL).\n@required {body: any # the complex JSON formatted datastructure to get the location history of one device}\n\n@endgroup\n\n@group GetVisitorHistory\n@endpoint POST /GetVisitorHistory\n@desc Visitor History is stored on the server with every request to the location or location history information of a device. There is a server-side setting that controls up to how many Visitors the server is storing in the Visitor History before it removes the oldest one. To request the Visitor History of a particular device the client sends the following POST request to the GetVisitorHistory service URL.\n@required {body: any # the complex JSON formatted datastructure to get the visitor history of one device}\n\n@endgroup\n\n@end\n"}}