connect method

Future<String> connect(
  1. String snap,
  2. String plug,
  3. String slotSnap,
  4. String slot,
)

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

Implementation

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