scrap method

Future<LinkResult> scrap(
  1. String url, {
  2. int? templateId,
  3. Map<String, String>? templateArgs,
})

Send kakaoLink messages with scrapped url.

Implementation

Future<LinkResult> scrap(String url,
    {int? templateId, Map<String, String>? templateArgs}) async {
  var params = {
    "request_url": url,
    "template_id": templateId,
    "template_args": templateArgs == null ? null : jsonEncode(templateArgs)
  };
  params.removeWhere((k, v) => v == null);
  return _validate("scrap", params);
}