getPost method

Future<Post> getPost({
  1. required String author,
  2. required String permlink,
})

Return a post with the given parameters. Throws a NotFoundFailure if a post could not be found.

Implementation

Future<Post> getPost({
  required String author,
  required String permlink,
}) async {
  final bodyJson = await _fetchPostData(
    method: 'bridge.get_post',
    params: {'author': author, 'permlink': permlink},
  );

  return Post.fromJson(bodyJson['result'] as Map<String, dynamic>);
}