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.
Neue Funktionen
Version 1.0
First release
Was er macht
7 Aktionen-
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
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#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}"
})
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von gwgans
Das gefällt dir vielleicht auch
Werbung