postPusher method

Future<void> postPusher(
  1. Pusher pusher, {
  2. bool? append,
})

This endpoint allows the creation, modification and deletion of pushers for this user ID. The behaviour of this endpoint varies depending on the values in the JSON body.

See deletePusher to issue requests with kind: null.

https://sdn.org/docs/spec/client_server/r0.6.1#post-sdn-client-r0-pushers-set

Implementation

Future<void> postPusher(Pusher pusher, {bool? append}) async {
  final data = pusher.toJson();
  if (append != null) {
    data['append'] = append;
  }
  await request(
    RequestType.POST,
    '/client/v3/pushers/set',
    data: data,
  );
  return;
}