spotify-api / spotify-api.js

A complete wrapper for spotify web api for deno, node.js and the browser.
https://spotify-api.js.org
MIT License
211 stars 19 forks source link

Client.create is not a static method #102

Closed peterjuras closed 2 years ago

peterjuras commented 2 years ago

Bug Report

What i expected:

I wanted to use const client = await Client.create(...); as specified in the example.

What actually happened:

TypeScript complains that create doesn't exist on the Client class:

image

Looking into the source code, create appears to be a Class member, and not a static method.

To reproduce this bug:

This codesandbox shows the same error

Kuplynx commented 2 years ago

Same issue for me btw

Kuplynx commented 2 years ago

Just figured it out for ya. You just have to do const client = new Client({..args}). Just out-of-date documentation.

scientific-dev commented 2 years ago

Yeah it is a mistake in code. We will fix it quickly and notify you when the new version is ready.

Btw sorry for the late reply.

peterjuras commented 2 years ago

@scientific-dev No worries, thank you for creating and working on this! You also might want to add tests to ensure that everything works as intended.

Keep up the good work!

scientific-dev commented 2 years ago

I have fixed the error above and released a new version v9.0.2. I have also updated the documentation.

If you find any further bugs in the package or in the documentation kindly open an new issue.