Gabb-c / pokenode-ts

A lightweight Node.js wrapper for the PokéAPI with built-in types.
https://pokenode-ts.vercel.app/
MIT License
244 stars 28 forks source link

Add version to FlavorText interface #981

Closed nathonius closed 10 months ago

nathonius commented 10 months ago

Pull Request Template

Checks and Guidelines

Apologies, I edited this directly in GitHub 😅

Type of Change

Describe the Changes

I've added this because it seems to be included in the API response for a species. I see in the history for this file that it was there at one point, then removed. Maybe it needs to be marked as optional? But the value is definitely there; for example, here's part of the response from /api/v2/pokemon-species/wooper:

"flavor_text_entries": [
        {
            "flavor_text": "This POKéMON lives\nin cold water. It\nwill leave the\fwater to search\nfor food when it\ngets cold outside.",
            "language": {
                "name": "en",
                "url": "https://pokeapi.co/api/v2/language/9/"
            },
            "version": {
                "name": "gold",
                "url": "https://pokeapi.co/api/v2/version/4/"
            }
        },
        {
            "flavor_text": "When it walks a­\nround on the\nground, it coats\fits body with a\nslimy, poisonous\nfilm.",
            "language": {
                "name": "en",
                "url": "https://pokeapi.co/api/v2/language/9/"
            },
            "version": {
                "name": "silver",
                "url": "https://pokeapi.co/api/v2/version/5/"
            }
        },
        {
            "flavor_text": "A mucous\nmembrane covers\nits body. Touching\fit barehanded will\ncause a shooting\npain.",
            "language": {
                "name": "en",
                "url": "https://pokeapi.co/api/v2/language/9/"
            },
            "version": {
                "name": "crystal",
                "url": "https://pokeapi.co/api/v2/version/6/"
            }
        },
vercel[bot] commented 10 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @Gabb-c on Vercel.

@Gabb-c first needs to authorize it.

sonarcloud[bot] commented 10 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pokenode-ts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2023 0:18am
Gabb-c commented 10 months ago

Hey @nathonius, thanks for the fix 🔧 Will review and aprove ASAP