A simple Python wrapper for the https://comments.bot API.
Find a file
dependabot-preview[bot] a30a17fe34
Create Dependabot config file (#3)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-25 12:14:32 -03:00
.github Create Dependabot config file (#3) 2020-09-25 12:14:32 -03:00
comments Convert indentation to 4 spaces and lint code 2019-11-13 18:06:25 -03:00
.gitignore Convert indentation to 4 spaces and lint code 2019-11-13 18:06:25 -03:00
LICENSE Add our license 2019-06-05 21:06:16 -03:00
README.md Add initial documentation 2019-06-05 20:57:21 -03:00
setup.py Initial commit 2019-06-05 20:15:52 -03:00

comments

PyPi Python 3

A simple Python wrapper for the https://comments.bot API.

Basic usage

import comments

client = comments.Client("YOUR_API_KEY_HERE", owner_id=YOUR_USER_ID_HERE)

post = client.createPost(type="text", text="Hello world")

print(post.post_id)
print(post.link)
You will get something like this:
xxxxxxxx
https://comments.bot/thread/xxxxxxxx

createPost() arguments:

owner_id:

required if not passed on Client.

type:

must be text or photo. text is used by default if not specified.

text:

required if type equals to text. It must be a string betwen 0-4056 characters.

photo_url:

required if type equals to photo. It must be a string containing a link to the image.

caption:

Caption for the image. Only valid for photo type.

parse_mode:

Parse mode for the text/caption. It must be markdown or html.

administrators:

A string with user_ids (numbers) separated by comma. Example: 123456789,987654321,012345678.

disable_notifications:

Pass True if you don't want to receive notifications about new comments for your post.