scrapLink method

Future<LinkInfo> scrapLink(
  1. String url
)

Gets a scraping result with the given url.

Returned LinkInfo can be used by StoryApi.postLink().

Implementation

Future<LinkInfo> scrapLink(String url) async {
  return ApiFactory.handleApiError(() async {
    final response = await _dio
        .get("/v1/api/story/linkinfo", queryParameters: {"url": url});
    return LinkInfo.fromJson(response.data);
  });
}