Giter VIP home page Giter VIP logo

palworld-paldex-api's Introduction

Palworld Paldex

Palworld Paldex API

First Palworld API

GitHub top language GitHub language count Repository size GitHub last commit Repository issues GitHub

Info   |    Technologies   |    How to   |    Functionalities   |    Contribute   |    License

🚀 Info

This is the first Palworld API, it's a simple API to get all Palworld Paldex data.

This is what final data looks like
{
  "content": [
    {
      "id": 85,
      "key": "085",
      "image": "/public/images/paldeck/085.png",
      "name": "Relaxaurus",
      "wiki": "https://palworld.fandom.com/wiki/Relaxaurus",
      "types": ["dragon", "water"],
      "imageWiki": "https://static.wikia.nocookie.net/palworld/images/0/01/Relaxaurus_menu.png/",
      "suitability": [
        {
          "type": "watering",
          "image": "/public/images/works/watering.png",
          "level": 2
        },
        {
          "type": "transporting",
          "image": "/public/images/works/transporting.png",
          "level": 1
        }
      ],
      "drops": ["high_quality_pal_oil", "ruby"],
      "aura": {
        "name": "hungry_missile",
        "description": "Can be ridden. Can rapidly fire a missile launcher while mounted.",
        "tech": null
      },
      "description": "Contrary to its blasé appearance, it's quite ferocious.\nIt perceives everything in its sight as prey and will stop at nothing to devour it.",
      "skills": [
        {
          "level": 1,
          "name": "dragon_cannon",
          "type": "dragon",
          "cooldown": 2,
          "power": 30,
          "description": "Hurls an energy ball imbued with draconic energy at an enemy.\n"
        },
        {
          "level": 7,
          "name": "aqua_gun",
          "type": "water",
          "cooldown": 4,
          "power": 40,
          "description": "Hurls a ball of water straight at an enemy.\n"
        },
        {
          "level": 15,
          "name": "dragon_burst",
          "type": "dragon",
          "cooldown": 10,
          "power": 55,
          "description": "Quickly discharges draconic energy, damaging those around it.\n"
        },
        {
          "level": 22,
          "name": "bubble_blast",
          "type": "water",
          "cooldown": 13,
          "power": 65,
          "description": "Fires numerous bubbles that slowly pursue an enemy.\n"
        },
        {
          "level": 30,
          "name": "draconic_breath",
          "type": "dragon",
          "cooldown": 15,
          "power": 70,
          "description": "Exhales breath imbued with draconic energy, dealing continuous damage to those in front of it.\n"
        },
        {
          "level": 40,
          "name": "aqua_burst",
          "type": "water",
          "cooldown": 30,
          "power": 100,
          "description": "Creates a giant ball of water and hurls it at an enemy.\n"
        },
        {
          "level": 50,
          "name": "dragon_meteor",
          "type": "dragon",
          "cooldown": 55,
          "power": 150,
          "description": "Calls down numerous small meteorites and launches them at an enemy.\n"
        }
      ],
      "stats": {
        "hp": 110,
        "attack": {
          "melee": 110,
          "ranged": 100
        },
        "defense": 70,
        "speed": {
          "ride": 800,
          "run": 650,
          "walk": 60
        },
        "stamina": 100,
        "support": 100
      },
      "asset": "LazyDragon",
      "genus": "monster",
      "rarity": 8,
      "price": 10240,
      "size": "xl",
      "breeding": {
        "rank": 280,
        "order": 54,
        "child_eligble": true,
        "male_probability": 50.0
      }
    }
  ],
  "page": 1,
  "limit": 10,
  "count": 1,
  "total": 1
}

👪 Breeding

The breeding.rank can be used to calculate the children for two parents:

$$ \text{Child Rank} = \lfloor \frac{\text{ParentA Rank} + \text{ParentB Rank} + 1}{2} \rfloor $$

"The game will then pick the Pal with the closest power to that average. [...] The 'tie breaker' (since 1015 is equal distance between 1010 and 1020) just comes down to the which Pal [has the lower breeding.order number].

~ https://palworld.fandom.com/wiki/Breeding

For example, if you have Penkin (Breed Power = 520) and breed it with Vanwyrm Cryst (Breed Power = 620) you get a child with a Breed Power of 570:

$$ \text{Child Rank} = \lfloor \frac{520 + 620 + 1}{2} \rfloor = 570 $$

The pal with the nearest distance to 570 is Anubis, so if you breed Penkin with Vanwym Cryst you'd get Anubis. Some pals can only be bred if their parents are both of the type of the offspring. This is marked by the breeding.child_eligble flag.

There are a few special cases, however:
    # Relaxaurus + Sparkit = Relaxaurus Lux
    "085+007": "085B",
    # Arsox + Broncherry = Kitsun
    "042+086": "061",
    # Direhowl + Gumoss = Maraith
    "026+013": "066",
    # Jormuntide + Shadowbeak = Helzephyr
    "101+107": "097",
    # Helzephyr + Shadowbeak = Cryolinx
    "097+107": "083",
    # Suzaku + Relaxaurus = Astegon
    "102+085": "098",
    # Penking + Bushi = Anubis
    "011+072": "100",
    # Incineram + Maraith = Incineram Noct
    "040+066": "040B",
    # Mau + Pengullet = Mau Cryst
    "024+010": "024B",
    # Vanwyrm + Foxcicle = Vanwyrm Cryst
    "071+057": "071B",
    # Eikthyrdeer + Hangyu = Eikthyrdeer Terra
    "037+032": "037B",
    # Elphidran + Surfent = Elphidran Aqua
    "080+065": "080B",
    # Pyrin + Katress = Pyrin Noct
    "058+075": "058B",
    # Mammorest + Wumpo = Mammorest Cryst
    "090+091": "090B",
    # Mossanda + Grizzbolt = Mossanda Lux
    "033+103": "033B",
    # Dinossom + Rayhound = Dinossom Lux
    "064+060": "064B",
    # Jolthog + Pengullet = Jolthog Cryst
    "012+010": "012B",
    # Frostallion + Helzephyr = Frostallion Noct
    "110+097": "110B",
    # Kingpaca + Reindrix = Kingpaca Cryst
    "089+059": "089B",
    # Lyleen + Menasting = Lyleen Noct
    "104+099": "104B",
    # Leezpunk + Flambelle = Leezpunk Ignis
    "045+070": "045B",
    # Blazehowl + Felbat = Blazehowl Noct
    "084+094": "084B",
    # Robinquill + Fuddler = Robinquill Terra
    "048+022": "048B",
    # Broncherry + Fuack = Broncherry Aqua
    "086+006": "086B",
    # Surfent + Dumud = Surfent Terra
    "065+043": "065B",
    # Gobfin + Rooby = Gobfin Ignis
    "031+009": "031B",
    # Suzaku + Jormuntide = Suzaku Aqua
    "102+101": "102B",
    # Reptyro + Foxcicle = Reptyro Cryst
    "088+057": "088B",
    # Hangyu + Swee = Hangyu Cryst
    "032+053": "032B",
    # Mossanda + Petallia = Lyleen
    "033+087": "104",
    # Vanwyrm + Anubis = Faleris
    "071+100": "105",
    # Mossanda + Rayhound = Grizzbolt
    "033+060": "103",
    # Grizzbolt + Relaxaurus = Orserk
    "103+085": "106",
    # Kitsun + Astegon = Shadowbeak
    "061+098": "107",
    # Bushi + Arsox = Blazehowl
    "072+042": "084",

The breeding power data was taken from @dini.rfl's Google Docs Sheet

💻 Technologies

This project was developed following this technologies:

ℹ️ How To

To clone this application you will need Git + bun. Run in terminal:

##### Clone this repo #####

# https
$ git clone https://github.com/mlg404/palworld-paldex-api.git

# ssh
$ git clone [email protected]:mlg404/palworld-paldex-api.git

##### Access this repo #####
$ cd palworld-paldex-api

##### Install dependencies #####
$ bun install

##### Run the application #####
$ bun start

You also can run it easily with Docker:

docker-compose up

After that, just choose your favorite API client and make a request to http://localhost:3000.

You can pass some query params to the request, like http://localhost:3000?page=1&limit=10&name=Relaxaurus.

All query params are optional, but you can use them to filter the results.

Param Type Description
page number The page number you want to get. Default is 1.
limit number The number of results you want to get. Default is 10.
name string The name of the Pal you want to get.
types string The type of the Pal you want to get.
suitability string The suitability of the Pal you want to get.
drops string The drop of the Pal you want to get.
key string The key of the Pal you want to get.
term* string The term you want to search.

*This api provides full text search with Elasticlunr, so you can search for any term in the Palworld Paldex.

🔎 Functionalities

See the current features!

  • ElysiaJS for fast and easy API development;
  • Elasticlunr for fast and easy full text search;
  • useCase's structure for better code organization;
  • typescript for better code quality;
  • typesafety for better code quality;
  • Docker

🌠 Upcoming features

  • Error handling
  • Eslint and Prettier
  • Tests

🧪 Testing

Testing is a crucial part of maintaining the quality and reliability of the Palworld Paldex API. This section explains how to run the tests and provides a brief overview of the testing setup.

Running the Tests

To ensure that the API functions as expected, follow these steps to run the tests:

$ bun test

This will run all the automated tests and display the results.

Types of Tests (WIP)

The testing suite includes the following types of tests:

  • Unit Tests: These tests cover individual functions and components to ensure they behave as expected in isolation.

Test Coverage

We aim to cover as much of the codebase as possible with our tests to maintain high standards of quality and reliability. Test coverage metrics are regularly updated and can be viewed in the test reports.

Continuous Integration

WIP

Contributing to Tests

Contributions to improve or add tests are always welcome. If you're interested in contributing, please follow the guidelines in the Contribute section.

👥 Contribute

  • Fork this repository;
  • Create one branch with your feature: git checkout -b my-feature;
  • Commit your alterations: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

Open a pull request with your branch. After pull request merge, you should delete your branch.

📝 License

This project is under MIT license. See LICENSE for more information.


Made with 💙 by Victor Eyer 👋 Get in touch!

This project was created using bun init in bun v1.0.25. Bun is a fast all-in-one JavaScript runtime.

🔧 Projects that make use of palworld-paldex-api

palworld-paldex-api's People

Contributors

burningdroid avatar c-eric avatar cregory0 avatar darmiel avatar lilsadpanda avatar linzera avatar mlg404 avatar rodion15 avatar xstellarz avatar xyrrm avatar zshift avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

palworld-paldex-api's Issues

[Question] Does this API have plans on going live?

I didn't notice any mention of deployment. Are you planning to make the API live? If not, we could definitely consider offering the service code as an SDK for developers who want to build something with Palworld.

Add Gears

Hi, I'm doing the same thing, hahaha. I've already managed to create a JSON generator for the gears.
Just a moment

Drops JSON and adds database

What is the problem this feature would solve?

JSON is quite big right now and we have so much data
Data is related with each other and with different json files

In the current JSON way, filters, order and other is difficult

What is the feature you are proposing to solve the problem?

  • Adds some database (like postgresql)
  • Use ORM like Prisma to help productivity
  • In each release, make the .json file available with all the data
  • Make the database .sql available

What alternatives have you considered?

No response

Which auras require crafted item

Hello, appreciate the work!
I was wondering if you planned to add something that indicated if an aura needed a crafted item to be enabled.
I was thinking maybe an additional field underneath aura

Add a key to item.json

What is the problem this feature would solve?

The drop item information in pals.json consists of lowercase letters without spaces.
There's no matching information in item.json except for the name.

What is the feature you are proposing to solve the problem?

How about adding the key value to item.json?
If that's acceptable, may I submit a PR after adding it?

What alternatives have you considered?

No response

LICENSE file missing in the repo

Hey, very interesting project that you're developing!

I saw that you disclosed on the readme that the project is under the MIT license but you don't have the license on the repo and the readme link is also broken (because the file does not exist).

Can you please provide the LICENSE of the project on the repo?

Thanks!

Test docs issue

What is the type of issue?

Something else

What is the issue?

This is just a test

Where did you find it?

This is just a test

Work suitability types are inconsistent

There are some inconsistencies specifically in the casing of names of work suitability. Below are my findings:
id 37 and 117 has a suitability element with type: "Lumbering", while any other occurrence is fully lowercase "lumbering".
The suitabilities that are composed of two words have uppercase of the first letters of each word.
One word suitabilities are fully lowercase (except the above lumbering one)

This occured on 27/01/2024, as response to a get request, with parameter ?limit=137
paldeck.json

[question] does this api have breeding info too?

Implementing an api which also provides information about which pal breed with another would produce which pals with good or best stats and better passive skills ( also taking into consideration a passive skill as an factor).

Just an thought let me know what do yall think about it ?

Cannot find module

What platform is your computer?

Linux 5.15.0-91-generic x86_64 x86_64

What steps can reproduce the bug?

git clone repo and run with docker-compose

What is the expected behavior?

No response

What do you see instead?

$ bun --watch run ./src/index.ts
error: Cannot find module "@services/index" from "/usr/src/app/src/useCases/pals/list/list-pals.usecase.ts"

Additional information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.