api.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:python-wp 作者: myles 项目源码 文件源码
def delete_post(self, pk, force=False):
        """
        Delete a Post.

        Arguments
        ---------

        pk : int
            The post id you want to delete.
        force : bool
            Whether to bypass trash and force deletion.
        """
        resp = self._delete('posts/{0}'.format(pk), params=locals())

        if resp.status_code == 200:
            return True
        else:
            raise Exception(resp.json())

    # Post Reivion Methods
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号