Skip to content

Commit

Permalink
Merge pull request #16 from pinpong/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
pinpong authored Jul 20, 2024
2 parents 649005d + 74cafd4 commit 6e9ddcb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ This is a very simple example. This creates a remote client and retrieves the de
import { RemoteClient } from 'mygekko-client-library';

const client = new RemoteClient({
username: 'test@test.com',
gekkoId: 'XXXX-XXXX-XXXX-XXXX',
apiKey: 'damnSecure',
username: '<your-mygekko-user-email>',
gekkoId: '<your-gekko-id>',
apiKey: '<your-mygekko-api-remote-key>',
});

try {
const blinds = client.blinds.getAll();
const blinds = client.blinds.getItems();
console.log(blinds);
await client.blinds.setPosition('item0', 75);
const blindsTrends = client.blinds.getTrends(
Expand All @@ -50,13 +50,13 @@ And this creates a local client and retrieves the details of all blinds:
import { LocalClient } from 'mygekko-client-library';

const client = new LocalClient({
ip: '127.0.1',
username: 'user',
password: 'damnSecure',
ip: '<your-mygekko-ip-address>',
username: '<your-mygekko-username>',
password: '<your-mygekko-password>',
});

try {
const blinds = client.blinds.getAll();
const blinds = client.blinds.getItems();
console.log(blinds);
await client.blinds.setPosition('item0', 75);
const blindsTrends = client.blinds.getTrends(
Expand Down
4 changes: 2 additions & 2 deletions test/client/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('remote client', async () => {

/*
try {
const blinds = client.blinds.getAll();
const blinds = client.blinds.getItems();
console.error(blinds);
await client.blinds.setPosition("item0", 75);
} catch (e) {
Expand All @@ -30,7 +30,7 @@ test('local client', async () => {

/*
try {
const blinds = client.blinds.getAll();
const blinds = client.blinds.getItems();
console.error(blinds);
await client.blinds.setPosition("item0", 75);
} catch (e) {
Expand Down

0 comments on commit 6e9ddcb

Please sign in to comment.