This shortcut uses my Get My Access Token and Get Vehicle ID shortcuts and is used by my Headed Home shortcut. See the Collection Tesla Triggers.
This shortcut sends an address to the in-car nav.
Address is explicit in the shortcut. Referencing your Contacts address or allowing an address to be entered on run are potential enhancements.
Novedades
Versión 1.0
First release
Qué hace
7 acciones-
Run ShortcutGet My Access Token
-
Text
-
Run ShortcutGet Vehicle ID
-
Street Address
-
URLhttps://owner-api.teslamotors.com/api/1/vehicles/…/command/navigation_request
-
Get Contents of URL
-
Get Dictionary Value
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#include 'actions/web'
#include 'actions/location'
#define color lightblue
#define glyph locationPin
const access_token = runSelf()
const vehicle_id = runSelf()
streetAddress("", "", "", "", "", 0)
url("https://owner-api.teslamotors.com/api/1/vehicles/{vehicle_id}/command/navigation_request")
jsonRequest("", "POST", {
"locale": "en-US",
"timestamp_ms": "1539465730",
"type": "share_ext_content_raw",
"value": {
"android.intent.ACTION": "android.intent.action.SEND",
"android.intent.TYPE": "text\\/plain",
"android.intent.extra.SUBJECT": "Place Name",
"android.intent.extra.TEXT": "{}"
}
}, {
"Authorization": "Bearer {access_token}"
})
Abrir en Cherri Playground
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.
Valoraciones y reseñas
Escribe una reseña–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!
Publicidad
Más de gwgans
También te puede gustar
Publicidad