From abf365f2f9c803ef7a103090b7d4bd000f287509 Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Wed, 22 Nov 2023 20:56:50 +0300 Subject: [PATCH] Editing post in neuroapi --- neuroapi/post.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neuroapi/post.py b/neuroapi/post.py index 0138d54..1ad0b1b 100644 --- a/neuroapi/post.py +++ b/neuroapi/post.py @@ -48,3 +48,10 @@ class Post(ApiMethod): if 'statusCode' in data: raise Exception(data['message']) return data + + async def edit_text(self, post_id: str, text: str): + response = requests.post(self.api_url+f"/post/edit/{post_id}", data={"text": text}) + data = response.json() + if 'statusCode' in data: + raise Exception(data['message']) + return data \ No newline at end of file