Implement `getPost`

This commit is contained in:
krawieck 2020-08-14 15:47:23 +02:00
parent e464a0b922
commit be71efd3c1
1 changed files with 7 additions and 2 deletions

View File

@ -27,10 +27,15 @@ extension PostEndpoint on V1 {
Future<FullPost> getPost({
@required int id,
String auth,
}) {
}) async {
assert(id != null);
throw UnimplementedError();
var res = await get('/post', {
'id': id.toString(),
if (auth != null) 'auth': auth,
});
return FullPost.fromJson(res);
}
/// GET /post/list