Skip to content

Commit

Permalink
Updates example
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed May 26, 2022
1 parent 5a53f4f commit 4782060
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ A module for starting and stopping your Zaptec Go EV charger
You will need your username and password for the [Zaptec Portal](https://portal.zaptec.com/)

```JavaScript
import { start, stop } from '@alhemisins/zaptec-go-start-stop';
import { start, stop } from '@alhemisins/zaptec-go-start-stop'

const username = '<your-zaptec-portal-username>';
const password = '<your-zaptec-portal-password>';
const username = '<your-zaptec-portal-username>'
const password = '<your-zaptec-portal-password>'

start({ username, password }); // => { status: 'success', message: 'Started charging' }
stop({ username, password }); // => { status: 'success', message: 'Stopped charging' }
const resultStart = await start({ username, password })
console.log(resultStart) // => { status: 'success', message: 'Started charging' }

const resultStop = await top({ username, password })
console.log(resultStop) // => { status: 'success', message: 'Stopped charging' }
```

# Limitations
Expand Down

0 comments on commit 4782060

Please sign in to comment.