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

Support for collecting spond posts #96

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Support for collecting spond posts #96

wants to merge 3 commits into from

Conversation

ytx96
Copy link

@ytx96 ytx96 commented Nov 13, 2023

Added API call get_posts() for reading last 1K posts.

url = f"{self.api_url}posts?type=PLAIN&includeComments=true&includeReadStatus=true&includeSeenCount=true&max=1000&groupId={uid}&prevId={prevuid}&maxTimestamp={date}T00:00:00.211Z"

Amount of collected posts could be set to use input value in the function instead of defaulting to 1K: max=SOME_VARIABLE.

MrVasquez96 and others added 3 commits November 13, 2023 11:21
Fixed wrong explanation for the use of `{date }`
@elliot-100 elliot-100 linked an issue Nov 23, 2023 that may be closed by this pull request
@elliot-100 elliot-100 self-requested a review November 23, 2023 12:03
UID of the group.
prevuid : str
Different UID used on the webpage, optional to use when calling this function.
date : str
Copy link
Collaborator

@elliot-100 elliot-100 Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be an optional datetime, like in get_events(), not a string.

@elliot-100 elliot-100 marked this pull request as draft November 23, 2023 12:08
uid : str
UID of the group.
prevuid : str
Different UID used on the webpage, optional to use when calling this function.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would someone actually use prevuid - can you give an example? If it's optional, it should be coded as such.

@elliot-100
Copy link
Collaborator

elliot-100 commented Nov 23, 2023

Amount of collected posts could be set to use input value in the function instead of defaulting to 1K: max=SOME_VARIABLE.

Yes, I think this is necessary. 1000 seems a lot - is there an inbuilt default when calling the API without this parameter?

@elliot-100 elliot-100 added the enhancement New feature or request label Oct 22, 2024
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

Successfully merging this pull request may close these issues.

Is it possible to retrieve posts as opposed to messages?
3 participants