Giter Club home page Giter Club logo

api's People

Contributors

akivonakira avatar apex2504 avatar bryanless avatar deepnimma avatar donovangg avatar dromzeh avatar estyms avatar exhabition avatar gergerapex1 avatar hruzinov avatar ink-soul avatar irevenko avatar jjonnick avatar jmpjns avatar kathyn138 avatar liz3 avatar luminettebourgeons avatar m4gicb avatar majkus522 avatar man90es avatar midna92 avatar oscarsandford avatar psdat123 avatar pv42 avatar r1df avatar salomekbg avatar stupid-benz avatar tainted06 avatar tokino avatar xlenore 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

[Question] Public API load limits

Hi πŸ‘‹

Is there any limitations to usage of public api deployed on https://api.genshin.dev?

I plan to create something like open source catalog web app based on data from your API with features like search, team builder and much more.

If this app will send requests based on the pages visited by users like search by name of hero or something like this, will I be penalized if it makes a heavy load on your server?

Should the character files include their scaling?

I don't think that they should include the scaling for every level because I think it's a bit ridiculous and also unnecessary. But I do think they should include some other levels to provide an idea for how good the stats are towards late game. So I would say probably the base damage then the talent at max without constellations and then at max including constellations. And then also their stat scaling such as health, and attack?

Character skins

Hey, your API seems nice but I thought about a little addition.
I think it would be nice for each character to have a list of their skins (if they have some) when you request the character's info:

Example for Keqing (since she will have a skin in 2.4)
"skins":[{"name":"Opulent Splendor","image":"https://skin_img.png"},

Add PT language to lang

Hi, I would like to add the Portuguese language to the lang, because when I use ?lang=PT there is no translation for our language, could you add?

Character Description

kaeya's character description is wrong. it's been changed to "An accomplished swordsman and a strategic thinker in the Knights of Favonius, rumored to hail from beyond Mondstadt." in game.

hosting suggestion

hey! I can't find a link to your discord server, but I wanted to suggest how to host this: since you only have static data, why not host it all on netlify? you don't really need a server component since you don't seem to do any logic, so maybe a static host is best.

API DOCS

Hello,
I am doing a front concept proof and I would like to use your API,
do you have documentation of the api?

Thank you very much for the effort!

Feature Request: Category Parameters

It would be nice if we are able to grab data based on the parameters. For example, being able to grab all characters with a specific vision (e.g Geo) or the Star ratings for artifacts, characters, and weapons.

I mean it's possible to implement this feature but not at the moment i guess, as it needs a route rework for more structured paths. Correct me if I'm wrong.

Certain weapons have incorrect "location" field

The following weapons have their location set to Gacha despite not being obtainable from it, but rather from chests or npcs:

Amber Catalyst
Dark Iron Sword
Ebony Bow
Fillet Blade
Halberd
Otherworldly Story
Quartz
Skyrider Greatsword
Twin Nephrite
White Iron Greatsword

Also Kunwu's Iris Rift needs to be renamed to Vortex Vanquisher

Updates and wishes

I'm coming back with some new ideas (not really new though, I planned to make my own API but it's too much a hassle so I'm giving you my ideas)
And I don't know if that can save you some time but I sent the JSON I had started to make.

Updates:
This could give the version (ex: 2.1), name (ex: Floating World Under the Moonlight), release date (ex: 09/01/2021), and update image.
versions_edit.json.txt

Wishes:
This would give info on the wish banners: start and end date, type (limited or permanent), version (ex: 2.1), name (ex: Invitation To Mundane Life), the banner image, and the main loots (usually 4 characters with an increased drop rate)
wishes_edit.json.txt

Do whatever you want with these ideas and files, hope that it can help :)

Add icon-big to thoma

https://api.genshin.dev/characters/thoma/list doesn't show icon-big and https://api.genshin.dev/characters/thoma/icon-big doesn't exist.

Only 57 characters showable

It seems like are only 57 characters being showed in the API, even if it is updated with all the 71 playable characters.
Apparently the characters that received an update also don't have a path page.
The attachment files show it as in the Postman.
image
image
image

Character Name Mispell

Shenhe is spelled as Shenli in the character data, if I get around to it I'll fix this myself.

Xiao and Hutao's portraits

I found that most of the character pictures in images/characters are card image (appearing in character posters), but Xiao and Hutao’s are gacha image (appearing in the gacha interface). Can you make some changes to distinguish them?
In addition, I also want to know how to obtain such a gacha image and a complete weapon image (not cropped)

Adding book entity

I wonder if it's a good idea to include books here.
The player needs to collect books in order to read the contents. And so I'm not sure whether making the contents public will raise any ethical or other issues.

What do you think about GraphQL?

This is just a discussion.
I think GraphQL would be a better option for relationship query.
But if we're adding support for GraphQL, some entity structure might have to be changed for better relationship definition. It would bring breaking changes to the api.
I would love to work on GraphQL support if we can reach agreements on it.

Inconsistency API response

When you request to /characters/amber, the response contains

{
  ...
  gender: "Female",
  specialDish: "Outrider's Champion Steak!",
  ...
}

which in the other request it doesn't exists.

And in some endpoints e.g. /characters/keqing or /characters/jean the response contain

{
  outfits: [
    {
      ...
    }
  ]
}

which in the other request isn't present.

And other things like:

  • nation key in /characters/aloy has 'Unknown' string value
  • birthday key in /characters/traveler(s) is missing
  • affilation key in /characters/traveler(s) has 'Not affilated to any Nation' string value

Is it better that if the missing key should be nullable instead of undefined or having an empty string?

A lack of information for /characters endpoint

Guys, thanks for doing a great job! When I getting data from https://api.genshin.dev/characters, there are only characters' names, and what if somebody wants to make some filters or sorts by characters (elements, nation, rarity), etc. It seems we need an array of objects with all info about every character in general /characters request, not only in special like /characters/albedo

Server Down

Hi My friend i start a project with ur api today your api is down 😒 think cloud or smt Hipe you fix it ❀️ good luck

Character data should include their id

Hey, I think it would be useful for the character data to include the identifier of the character.

This way, when parsing data from https://api.genshin.dev/characters/all, it would be possible to determine the URL for the icon of each character.

Happy to do it myself, if we can agree that this is a useful feature.

Search via Name

I'm still pretty new to this API and API's in general, but I was wondering if we could add a PUT or POST request to get a resource using a vague name. For example, my use case has a different format for storing character names, e.g. Albedo, HuTao, etc, and I want to search for their corresponding character resource so I would send a post or put request with a json body like

{
  "name": "Albedo", //HuTao
  "type":"character", // or characters if that helps
}

This returns what is basically on api.genshin.dev/characters/albedo and api.genshin.dev/characters/hu-tao.

[request] Add short name that used as access key in object with character's data

Hi πŸ‘‹

When I get data of character with long name (e.g. Kamisato Ayaka), also I want to get image of this character. In this case I need to make request that look like "https://api.genshin.dev/characters/ayaka/icon", but when I'm trying to do it programmatically (js):

const character = {...} // stored character's data got from api
const img = fetch(`https://api.genshin.dev/characters/${character.name}/icon`);

request looks like "https://api.genshin.dev/characters/Kamisato%20Ayaka/icon", even if I remove space and convert name to lower case, I can't get image due to mismatch with full name in character's data and short name that used as id for accessing data. In this case name is "Kamisato Ayaka" and short id name is "ayaka"

Solution is simple: I need to use constructions like switch or if-else like:

let idName = "";
// set proper key
if (character.name == "Kamisato Ayaka") {
 idName = "ayaka";
}

// then make request
const img = fetch(`https://api.genshin.dev/characters/${idName}/icon`); // https://api.genshin.dev/characters/ayaka/icon

but it looks ugly and not scalable in a long term.

Is it possible to make character's name and key name the same or add id name in character's data?

{
 "id": "ayaka",
 "name": "Kamisato Ayaka"
}

Unreleased data

What is the policy regarding information about unreleased entities?

I might be misinformed about this topic, if so please tell me!

There's some artifacts, like 'Prayers to the Firmament' and 'Glacier and Snowfield' that aren't released ingame. This poses at least three problems (in my opinion):

  1. Without a way to filter them out this pollutes data for potential consumers that only want to display stuff that is ingame.
  2. The availability of translations is lower (at least you can't get them ingame, only from third party sources that might or might not be right), therefore it's hard for anyone to fix the /all endpoint option. I can't simply add an english version for the artifacts mentioned above because I don't have access to the english description. A missing translation breaks the /all endpoint (this could also be an issue by itself).
  3. This might pose problems for the continuity of this project through Mihoyo's policy regarding leaks and stuff that should be under NDA. There's a reason these artifacts aren't present on the wiki for example.

Theres some ways to go about this:

  1. Implement a query parameter 'unreleased' (or something alike) which you can include to specify unreleased entities should be included in the result.
  2. Remove them alltogether; there's plenty of time to actually implement them when they're included in an update.

I'd like to hear everyone's opinions on this.

[Request] homogeneous API response

Hi all!
The response of the different endpoints are not homogeneous, I give an example.

https://api.genshin.dev/artifacts -> ["adventurer","archaic-petra",...] βœ…
https://api.genshin.dev/characters -> ["albedo","aloy","amber",...] βœ…
https://api.genshin.dev/characters/aloy -> {"name":"Aloy","title":"Savior From Another World",... βœ…
https://api.genshin.dev/consumables -> ["food","potions"] βœ…

https://api.genshin.dev/consumables/food -> {"pile-em-up":{"name":""Pile 'Em Up"",... ❌
I think it should be like this
https://api.genshin.dev/consumables/food -> ["pile-em-up","adeptus-temptation","adventurers-breakfast-sandwich",...] βœ…

I understand the reason why you have created it this way,
but this complicates the API and this request optimization must be done in front

Is it possible to unify the response data structure?

Thx so much!

[Bug] Weekly bosses not reachable

As mentionned in title, weekly boss are not reachable. Their data are in assets/data/boss/weekly-boss/XX, so in order to get them i call "/boss/weekly-boss/azhdaha".

The problem come here : because we have "/:param1/:param2/:param3", the router considers it as the route '/:type/:id/:imageType' and try to get the image of the entity "weekly-boss" instead of getting infos of the weekly-boss asked.

Unless the call for weekly-boss is different and doesn't require changes, I've thought of 2 way of corrections :

  • Create a new route which its path begins by "/boss/..." but we are no longer full generic in routes because we add "boss"
  • Move the folder weekly-boss at the same level as the others and keep boss for only non-weekly boss (but for some persons it can be less logic as weekly-boss is a type of boss)

Weapon base ATK cast to strings

I noticed that the "baseAttack" for weapons are cast to strings rather than integers/numbers/whatever. Is this intentional, or would ints/numbers be a more appropriate type for these?

[Request] Add version identifier to API results

Adding a unique version identifier to the api results (either the root, every index page, or even every result) that incremented whenever data was updated would allow developers to quickly determine if their data is stale. One request to the api root could be used to see if anything changed instead of having to walk through every page and resource to update any cached data.

Example:

// https://api.genshin.dev/
{
  "types": [
    "artifacts",
    "boss",
    "characters",
    "consumables",
    "domains",
    "elements",
    "enemies",
    "materials",
    "nations",
    "weapons"
  ],
  "version": 123.4
}

Alternatively, instead of inserting version to some/all endpoints via middleware, a /version endpoint could be added for this purpose.

The example above uses a version number but it could also be a hash, uuid, datetime, or any other unique value. Something that could be calculated instead of having to be manually updated each release seems preferable. Perhaps use something like node-cache to cache a hash of the assets directory?

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.