Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment implementation #6

Open
jtayped opened this issue May 9, 2024 · 1 comment
Open

Comment implementation #6

jtayped opened this issue May 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jtayped
Copy link
Owner

jtayped commented May 9, 2024

Comments are a weird element to implement due to the difficulty of identifying them as they do not have any obvious ID, unlike posts or users. Probably the most reliable way of doing that is by having a parent post element, a user, and the date when it was published.

from pygramcore import Post, User, Comment
from datetime import datetime

post = Post("post_id")
user = User("username")
date = datetime.now()

Comment(post, user, date)
@jtayped jtayped added the enhancement New feature or request label May 9, 2024
@jtayped
Copy link
Owner Author

jtayped commented May 12, 2024

A comment feature branch has been started at feature/comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant