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

v2.search.fetch returns results instead of a paginator #1018

Closed
patak-dev opened this issue Dec 26, 2023 · 3 comments · Fixed by #1019 or #1020
Closed

v2.search.fetch returns results instead of a paginator #1018

patak-dev opened this issue Dec 26, 2023 · 3 comments · Fixed by #1019 or #1020
Labels
bug Something isn't working released

Comments

@patak-dev
Copy link

I'm upgrading Elk to use masto v6, and the API looks great! Thanks for keep improving Masto.js @neet!

It seems v2.search.fetch isn't working as expected though. It should return a Paginator:

): Paginator<Search, SearchParams>;

But it is currently returning the results directly:

expect(results).toMatchObject({

The Search entity also has a type issue for Tag, as it should be an array (same as statuses and accounts):

Copy link

🎉 This issue has been resolved in version 6.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@neet
Copy link
Owner

neet commented Dec 27, 2023

Hi @patak-dev! Thank you for the kind words.

I released patch #1020 #1019 so it should work now. You need to change fetch to list due to the naming convention.

- masto.v2.search.fetch({ q: "cat" })
+ masto.v2.search.list({ q: "cat" })

If you get any other problem, please feel free to let me know :)

@patak-dev
Copy link
Author

Thanks a lot for the quick fix @neet! It works like a charm now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
2 participants