disconnect method

Future<String> disconnect(
  1. String plugSnap,
  2. String plug,
  3. String slotSnap,
  4. String slot,
)

Disonnects a plug from a slot. Returns the change ID for this operation, use getChange to get the status of this operation.

Implementation

Future<String> disconnect(
    String plugSnap, String plug, String slotSnap, String slot) async {
  var request = {
    'action': 'disconnect',
    'plugs': [
      {'snap': plugSnap, 'plug': plug}
    ],
    'slots': [
      {'snap': slotSnap, 'slot': slot}
    ]
  };
  return await _postAsync('/v2/interfaces', request);
}