invokeWebViewCustomMethod method

Future<Result<DataJSONBase>> invokeWebViewCustomMethod({
  1. required InputUserBase bot,
  2. required String customMethod,
  3. required DataJSONBase params,
})

Invoke Web View Custom Method.

ID: 087fc5e7.

Implementation

Future<Result<DataJSONBase>> invokeWebViewCustomMethod({
  required InputUserBase bot,
  required String customMethod,
  required DataJSONBase params,
}) async {
  // Preparing the request.
  final request = BotsInvokeWebViewCustomMethod(
    bot: bot,
    customMethod: customMethod,
    params: params,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<DataJSONBase>();
}