def commit(self, custom_url: str = '', meta: dict = None) \
-> 'Union[None, ResourceObject, Awaitable[Optional[ResourceObject]]':
"""
Commit (PATCH/POST) this resource to server.
:param custom_url: Use this url instead of automatically determined one.
:param meta: Optional metadata that is passed to server in POST/PATCH request
If in async mode, this needs to be awaited.
"""
if self.session.enable_async:
return self._commit_async(custom_url, meta)
else:
return self._commit_sync(custom_url, meta)
评论列表
文章目录