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

Notification history API appears to have changed on cohost's end #37

Open
lunasorcery opened this issue Feb 27, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@lunasorcery
Copy link
Contributor

lunasorcery commented Feb 27, 2024

EDIT: ignore this, looks like they're rolling out some sorta revamped notification system so let's hold off until that's out fully?

Looks like the /notifications/list endpoint uses the query parameter before with a datetime for pagination now, and offset no longer seems to affect the returned results. I think it's been this way for a while.

Under the new scheme the request looks something like:
GET /api/v1/notifications/list?limit=40&before=2024-02-27T12:30:39.968Z

and the API response would look something like:

{
    "comments": {...},
    "posts": {...},
    "projects": {...},
    "notifications": [...],
    "nextBefore": "2024-02-26T23:40:04.858Z"
}

I can have a stab at making the necessary code changes if you'd like? It would mean a minor API break for scripts using the library...

@valknight
Copy link
Owner

haha, thanks for the big edit at the top :) I'll keep this alive for now to track what's going on with this

@valknight valknight added the bug Something isn't working label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants