Skip to content

Commit

Permalink
d updates README with getTokenAndCharger (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Oct 10, 2022
1 parent 366b457 commit adf75ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ const resultStop = await top({ username, password })
console.log(resultStop) // => { status: 'success', message: 'Stopped charging' }
```

If you only want the chargerID and session token you can use `getTokenAndCharger`

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

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

const access = await getTokenAndCharger({ username, password })
console.log(resultStart) // => { status: 'success', message: 'Found charger and authenticated', id: '<your-charger-id>', token: '<your-session-token>' }
```

# Limitations

If you have multiple Zaptec Go chargers connected to your account this module will only pick the first one.
Expand Down

0 comments on commit adf75ee

Please sign in to comment.