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.
Nouveautés
Version 1.0
First release
Ce qu’il fait
7 actions-
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
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#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}"
})
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de gwgans
Ça pourrait aussi te plaire
Publicité