This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLIENT_ID= | |
CLIENT_SECRET= | |
AUDIENCE=https://fleet-api.prd.eu.vn.cloud.tesla.com | |
#LOGIN | |
TESLA_API_TOKEN=$(curl --request POST --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode "client_id=$CLIENT_ID" \ | |
--data-urlencode "client_secret=$CLIENT_SECRET" --data-urlencode 'scope=openid vehicle_device_data vehicle_cmds vehicle_charging_cmds' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {DateAdapter} from '@angular/material'; | |
import * as moment from 'moment'; | |
import {Inject, LOCALE_ID} from '@angular/core'; | |
export class MomentDateAdapter extends DateAdapter<moment.Moment> { | |
constructor(@Inject(LOCALE_ID)locale: any) { | |
super(); | |
this.setLocale(locale); | |
moment.locale(locale); |