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

Async notifications support + added endpoints #183

Merged
merged 8 commits into from
Aug 2, 2024
Merged

Async notifications support + added endpoints #183

merged 8 commits into from
Aug 2, 2024

Conversation

LucasCoderT
Copy link
Member

  • Added async-await support for all notification endpoints (and added tests)
  • Added Constructors for NotificationThread and Subject
  • added markThreadasDone endpoint support

@LucasCoderT LucasCoderT self-assigned this Feb 18, 2024
@LucasCoderT
Copy link
Member Author

LucasCoderT commented Feb 18, 2024

Before merging, I've found an issue.

For the pagination params around notifications, if I keep them as String. The API returns wrong/old/invalid data. But if I change them to be Int Then the router fails to encode them https://github.com/nerdishbynature/RequestKit/blob/main/Sources/RequestKit/Router.swift#L127

But then the API returns correct data despite this. so I'm not sure what exactly is going on here.

@pietbrauer
Copy link
Member

@LucasCoderT Have you looked at the resulting URLs? Are they the same? URL Params don't have types so I doubt page=2 (encoded as Int) makes a difference to page=2 encoded as String?

@LucasCoderT
Copy link
Member Author

@pietbrauer

Apologies, I think this had something to do with my local environment. When I tried it on my laptop instead of my desktop it responds and follows the params as expected. Weird. This PR should be good to go then 👍

Copy link
Member

@pietbrauer pietbrauer left a comment

Choose a reason for hiding this comment

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

Thanks 🌷

@pietbrauer pietbrauer merged commit 4419245 into nerdishbynature:main Aug 2, 2024
9 checks passed
@LucasCoderT LucasCoderT deleted the async-notifications branch August 24, 2024 21:02
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.

2 participants