getBlogPostById method

Future<BlogPost> getBlogPostById(
  1. int id
)

Gets a blog post by id

Implementation

Future<BlogPost> getBlogPostById(int id) async {
  final response = await _get('/api/blog/post/$id');

  return BlogPost.fromJson(response.data);
}