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

doesn't work with the new tenor v2 api? #7

Open
shai-raz opened this issue Oct 2, 2023 · 3 comments · May be fixed by #8
Open

doesn't work with the new tenor v2 api? #7

shai-raz opened this issue Oct 2, 2023 · 3 comments · May be fixed by #8

Comments

@shai-raz
Copy link

shai-raz commented Oct 2, 2023

they updated the api to v2 but it's only supporting v1 api keys which are no longer available

const url = new URL(`https://g.tenor.com/v1/${name}`)

should allow the option to use v2 url instead (https://tenor.googleapis.com/v2/)

@GauBen
Copy link
Owner

GauBen commented Oct 2, 2023

Hey there, thanks for your comment! svelte-tenor has been built for tenor v1 and not yet upgraded to v2. If you are interested to help migrate the codebase, it'll be with great pleasure.

@shai-raz
Copy link
Author

shai-raz commented Oct 2, 2023

Hey there, thanks for your comment! svelte-tenor has been built for tenor v1 and not yet upgraded to v2. If you are interested to help migrate the codebase, it'll be with great pleasure.

Sure, I'd love to help :)
As for deciding what version to use, what do you think the approach should be?

I got two different idea -

  1. Adding a "apiVersion" prop to each component to allow choosing. The default would be 1, and there will be a switch case to decide what to do per version.
  2. Adding a "apiVersion" option to the package.json, so users that want to use v2 would need to add the follow to their package.json (if not provided it would default to v1).
"svelte-tenor": {
    "apiVersion" : 2
}

I prefer the second approach better as it allows for the change to happen at 1 place instead of multiple places.

Thoughts?

@GauBen
Copy link
Owner

GauBen commented Oct 2, 2023

I'd remove support for v1, encouraging people to move to v2 to enjoy the better designed API (I guess), improved performance and the likes

@GauBen GauBen linked a pull request Dec 23, 2023 that will close this issue
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 a pull request may close this issue.

2 participants