tesla-fleet-api
Version:
A library for the [Tesla Fleet API](https://developer.tesla.com/docs/fleet-api), and the third parties services [Teslemetry](https://teslemetry.com/docs/getting-started/api) and [Tessie](https://developer.tessie.com/docs/tesla-api-comparison), which provi
31 lines • 1.17 kB
JavaScript
// Partner Class
export default class Partner {
constructor(parent) {
this.parent = parent;
}
/**
* Returns the public key associated with a domain. It can be used to ensure the registration was successful.
* @param domain Domain of the partner account.
* @returns
*/
async public_key(domain = null) {
return this.parent._request("GET", "api/1/partner_accounts/public_key", { domain });
}
/**
* Registers an existing account before it can be used for general API access. Each application from developer.tesla.com must complete this step.
* @param domain Domain of the partner account.
* @returns
*/
async register(domain) {
return this.parent._request("POST", "api/1/partner_accounts", null, { domain });
}
/**
* Returns recent fleet telemetry errors reported by vehicles after receiving the config.
* @param domain Domain of the partner account.
* @returns
*/
async fleet_telemetry_errors(domain) {
return this.parent._request("GET", "api/1/partner_accounts/fleet_telemetry_errors", { domain });
}
}
//# sourceMappingURL=partner.js.map