husqvarna-connectivity-sdk
v1.1.0
Published
Husqvarna Connectivity SDK
Maintainers
Readme
husqvarna-connectivity-sdk (Unofficial)
This package provides a TypeScript/JavaScript SDK for the Husqvarna Connectivity API.
⚠️ Disclaimer ⚠️ This SDK is not an official Husqvarna product. It is an open-source community project, built on top of the public API documented by Husqvarna. It's generated from the OpenAPI specification provided by Husqvarna with OpenAPI Generator.
Users of this SDK must :
- Create their own API key and OAuth2 credentials on the Husqvarna Developer Portal.
- Follow the official API Terms of Use.
This package is use
Requirements
You need to install husqvarna-authentication-sdk for authentication and getting an access token.
Installation
To install the package, run one of the following commands in your project folder :
NPM :
npm install husqvarna-connectivity-sdkPNPM :
pnpm add husqvarna-connectivity-sdkYarn :
yarn add husqvarna-connectivity-sdkUsage
Import the package in your TypeScript or JavaScript code :
import { DefaultApi as HusqvarnaConnectivityApi } from 'husqvarna-connectivity-sdk';
const apiHusqvarna = new HusqvarnaConnectivityApi(
new Configuration({,
apiKey: <Your API Key>,
baseOptions: {
headers: {
Authorization: `Bearer ${<Access Token generated with husqvarna-authentication-sdk package>}`,
}
}
})
);
const mowerInfo = await apiHusqvarna.devicesIdFullGet({
id: '<Your Mower ID getted from mowersGet endpoint of automower-connect-sdk package>',
});
console.info('Mower Info :', mowerInfo.data);Documentation
The full API documentation is available on the Husqvarna Developer Portal.
Documentation for API Endpoints
All URIs are relative to https://api.connectivity.husqvarna.dev/v1
| Class | Method | HTTP request | Description | | ------------ | ------------------------------------------------------------------------------------------- | ----------------------------------------- | ------------------------------------------------- | | DefaultApi | devicesGet | GET /devices | Returns list of device ids the user has access to | | DefaultApi | devicesIdFullGet | GET /devices/{id}/full | Returns the full details of a specific device | | DefaultApi | devicesIdGet | GET /devices/{id} | Returns the details of a specific device | | DefaultApi | specificationsSpecificationIdGet | GET /specifications/{specificationId} | Returns the details of a specific specification |
Documentation For Models
- DeviceAttributes
- DeviceAttributesAnyOf
- DeviceAttributesAnyOf1
- DeviceAttributesAnyOf2
- DeviceAttributesAnyOf3
- DeviceResponse
- DeviceResponseData
- DeviceResponseDataAttributes
- DeviceResponseDataAttributesUdm
- DevicesResponse
- DevicesResponseDataInner
- ErrorResponse
- FullDeviceResponse
- FullDeviceResponseData
- JsonApiErrorObject
- SpecificationResponse
- SpecificationResponseData
Documentation For Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: X-Api-Key
- Location: HTTP header
Authorization
- Type: Bearer authentication
