https://github.com/pinpong/mygekko-client-library
MyGekko javascript client library
https://github.com/pinpong/mygekko-client-library
api client ekon mygekko nova slide2 smarthome
Last synced: 5 months ago
JSON representation
MyGekko javascript client library
- Host: GitHub
- URL: https://github.com/pinpong/mygekko-client-library
- Owner: pinpong
- License: apache-2.0
- Created: 2023-09-09T22:23:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T16:02:58.000Z (almost 2 years ago)
- Last Synced: 2025-10-08T03:39:13.114Z (9 months ago)
- Topics: api, client, ekon, mygekko, nova, slide2, smarthome
- Language: TypeScript
- Homepage:
- Size: 340 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README







## Documentation
For more detailed documentation see [docs](https://pinpong.github.io/mygekko-client-library)
## Installation
```sh
yarn add mygekko-client-library
```
### Using the client library
This is a very simple example. This creates a remote client and retrieves the details of all blinds:
```js
import { RemoteClient } from 'mygekko-client-library';
const client = new RemoteClient({
username: '',
gekkoId: '',
apiKey: '',
});
try {
const blinds = client.blinds.getItems();
console.log(blinds);
await client.blinds.setPosition('item0', 75);
const blindsTrends = client.blinds.getTrends(
'2023-01-01T00:00:00+01:00',
'2023-01-06T00:00:00+01:00',
500
);
console.log(blindsTrends);
} catch (e) {
console.log(e);
}
```
And this creates a local client and retrieves the details of all blinds:
```js
import { LocalClient } from 'mygekko-client-library';
const client = new LocalClient({
ip: '',
username: '',
password: '',
});
try {
const blinds = client.blinds.getItems();
console.log(blinds);
await client.blinds.setPosition('item0', 75);
const blindsTrends = client.blinds.getTrends(
'2023-01-01T00:00:00+01:00',
'2023-01-06T00:00:00+01:00',
500
);
console.log(blindsTrends);
} catch (e) {
console.log(e);
}
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests.