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

Cat gif example broken (api key banned) #297

Closed
andys8 opened this issue Aug 10, 2022 · 5 comments · Fixed by #304
Closed

Cat gif example broken (api key banned) #297

andys8 opened this issue Aug 10, 2022 · 5 comments · Fixed by #304
Labels
good first issue Good for newcomers

Comments

@andys8
Copy link
Contributor

andys8 commented Aug 10, 2022

The two cat gif examples are based on REST api request to giphy.com. The hardcoded key in use is "banned".

"https://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=cat"

{
      "data": [],
      "meta": {
        "status": 403,
        "msg": "BANNED",
        "response_id": ""
      }
    }

It might work to create a new key and see how long it'll work. Depends on why the key was banned (revoked, because checked in a repository, because too many requests).

@pete-murphy
Copy link
Collaborator

pete-murphy commented Aug 10, 2022

Hm, from what I remember, the API key was copied from the elm-lang.org/examples/cat-gifs example. I see that URL (which is linked in the README

A React port of the ["HTTP - Cat GIFs" Elm Example](https://elm-lang.org/examples/cat-gifs).
) now re-directs to a different example for fetching quotes, and the cat GIFs example is missing. Maybe we should just replace the cat GIFs recipes with quotes recipes to keep parity with the Elm examples?

@pete-murphy
Copy link
Collaborator

Also, looks like there's a stale comment in the README for that recipe from when it was broken for a different reason 😅

Broken due to upgrading package set to `psc-0.13.8-20200716`.

@pete-murphy
Copy link
Collaborator

Maybe we should just replace the cat GIFs recipes with quotes recipes to keep parity with the Elm examples?

It looks like they're hosting the quotes API and blocking cross-origin requests, so maybe we just need to find a free alternative that doesn't require API key / rate-limit requests. Something like https://dog.ceo/dog-api/documentation/random?

@jgarte
Copy link

jgarte commented Oct 27, 2022

Cat gif elm links are broken. They point to quotes example.

@pete-murphy
Copy link
Collaborator

Could be a good first contribution if you're up for it @jgarte 🙂 . If not I can probably get around to fixing this sometime over the next couple weeks. Seems like we could just fetch a random dog image from dog.ceo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants