Skip to content

/posts/{post-id}/mute function added#180

Open
decafhotchocolate wants to merge 2 commits intotumblr:masterfrom
decafhotchocolate:master
Open

/posts/{post-id}/mute function added#180
decafhotchocolate wants to merge 2 commits intotumblr:masterfrom
decafhotchocolate:master

Conversation

@decafhotchocolate
Copy link
Copy Markdown

def mute(self, blogname, post_id=None, time=10):
    """
    Mute the notifications of the given post

    :param blogname: a string, the blog url with the post

    :param post_id: an int, the post id you wish to mute 

    :param time: an int, how many seconds the post should be muted (0 or no input = forever) 
    """
    params = {'blog-identifier': blogname, 'post-id': post_id, 'mute_length_seconds': time}
    url = "/v2/blog/" + blogname + "/posts/" + str(post_id) + "/mute"
    return self.send_api_request("post", url, params, ['blog-identifier', 'post-id', 'mute_length_seconds'])

Simple implementation just according to API, all works in my testing including timer function. I'm not sure if this project is maintained anymore, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant