Skip to main content

Devices

Link and the SDK API name every device as { type, id }. The only type today is charger, and id is the charger’s id in the SDK API. Ignore types you don’t know: later SDK releases and API versions may add some, such as meters.

Capabilities

Every charger from List chargers and Get a charger has capabilities: what Plugchoice can do for it.
  • needs lists what the phone or browser must be able to do for it. It’s empty when the capability isn’t capable.
  • More capabilities may be added. Ignore the ones you don’t know.
  • Capabilities follow the hosted flow: when Link learns a new brand or model, its chargers become capable without a release of your app.

Transports

needs holds transports: what the phone or browser must be able to do. The SDK tells you which ones this phone and your app have, without asking for a permission:

Show a button only where it works

Offer an action when the charger is capable of it and the phone has everything it needs:
Your server reads capabilities with its own credentials and passes them to your app; your app checks the transports. If your app opens an action the charger can’t do here anyway, Link shows what it can do instead. See Actions.