upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
158 stars 15 forks source link

client.topics is not a function #77

Closed mankins closed 6 months ago

mankins commented 7 months ago

I'm attempting to migrate from v1 to v2 and to do that wanted to access the topics api, following the examples here.

Unfortunately with the examples above, this line:

      const topics = client.topics();

returns

TypeError: client.topics is not a function

I'll try to use the http api directly, but thought this may be a bug or documentation error.

I'm using version 2.3.0 on node 18.17.1

ogzhanolguncu commented 7 months ago

I'll try to reproduce and let you know.

ogzhanolguncu commented 6 months ago

Hey, sorry for the late reply. This is how you should use topics: client.topics.list(). They are not meant to be called like functions.

mankins commented 6 months ago

I went ahead an made a PR to fix the docs. Thanks for the help.

ogzhanolguncu commented 6 months ago

Thanks, I appreciate the effort.