Skip to content

Commit

Permalink
add device identify endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgera committed Jan 28, 2024
1 parent a68e2af commit 07a5a9f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/api/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ export default (got: Got) => {
.json()
},

// TODO identifyDevice, stopIdentifyDevice
async startIdentifying({ id }: { id: string }) {
await got
.put(`devices/${id}/identify`, {
json: {
period: 30,
},
})
.json()
},

async stopIdentifying({ id }: { id: string }) {
await got
.put(`devices/${id}/identify`, {
json: {
period: 0,
},
})
.json()
},
}
}

0 comments on commit 07a5a9f

Please sign in to comment.