Skip to content

Commit

Permalink
Merge branch 'mistress' into update-traveler-electro-upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
man90es authored May 13, 2024
2 parents 44e002c + f4b4e47 commit ab8a38f
Show file tree
Hide file tree
Showing 1,214 changed files with 29,779 additions and 21,529 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: publish

on:
push:
branches: [mistress]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: genshindev/api

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist/
# ides
.vscode
.idea
.vs

*.log
npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:21
WORKDIR /usr/src/app

ARG PORT=5000
Expand Down
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,29 @@

An API that serves data for the game Genshin Impact by miHoYo (the game is made by miHoYo, not the API).

**An always up-to-date version is hosted at https://api.genshin.dev!**
**An always up-to-date version is hosted at https://genshin.jmp.blue!**

## Usage

This API offers various endpoints for retrieving data on in game objects.
Please note that this API does **NOT** interact with your game!.
This API only provides static data.

### Endpoints Overview

> **:information_source: Notice:** Please replace `<baseUrl>` with the endpoint you are trying to access.
| Endpoint | Description | Example Usage (bash) |
| ----------------------- | ------------------------------------------------------------- | ------------------------------------------ |
| `/` | Returns a list of available entity types. | `curl <baseUrl>/` |
| `/:type` | Returns a list of available entities for a specific type. | `curl <baseUrl>/characters` |
| `/:type/all` | Returns detailed information about all entities of a type. | `curl <baseUrl>/characters/all?lang=en` |
| `/:type/:id` | Returns detailed information about a single entity. | `curl <baseUrl>/characters/albedo?lang=en` |
| `/:type/:id/list` | Returns a list of available images for a specific entity. | `curl <baseUrl>/characters/albedo/list` |
| `/:type/:id/:imageType` | Returns the image of a specific type for a particular entity. | `curl <baseUrl>/characters/albedo/card` |

> **:information_source: Notice:** You can provide an optional `lang` query parameter to localize the responses.
> Not all data might be included in all languages!
## Planned Features

Expand All @@ -13,15 +35,15 @@ An API that serves data for the game Genshin Impact by miHoYo (the game is made

## Prerequisites

- [Node.js](https://nodejs.org/): ^12.0.0
- [NPM](https://npmjs.org/) or any other Node.js package manager
- [Node.js](https://nodejs.org/): ^16.0.0
- [PNPM](https://pnpm.io/)

## Installation

Install packages with your preferred package manager, e.g. npm:
Install packages with pnpm:

```
npm install
pnpm install
```

If you want to have the API running on a different port, rename the `.env.example` into `.env` and change the `API_PORT` field to your preferred port. \
Expand Down
6 changes: 6 additions & 0 deletions assets/data/artifacts/adventurer/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "冒险家",
"max_rarity": 3,
"2-piece_bonus": "生命值上限提升1000点。",
"4-piece_bonus": "开启各类宝箱后的5秒内,持续恢复30%生命值"
}
File renamed without changes.
1 change: 0 additions & 1 deletion assets/data/artifacts/archaic-petra/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
"2-piece_bonus": "Bono de Daño Geo +15%.",
"4-piece_bonus": "Al obtener un cristal creado a través de la reacción de Cristalización, todos los miembros del equipo obtienen durante 1 s un 35% de Bono de Daño Elemental del elemento que causó dicha reacción. Solo se puede obtener un tipo de Bono de Daño Elemental a la vez."
}

6 changes: 6 additions & 0 deletions assets/data/artifacts/archaic-petra/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "悠古的磐岩",
"max_rarity": 5,
"2-piece_bonus": "获得15%岩元素伤害加成。",
"4-piece_bonus": "获得元素反应形成的晶片时,队伍中所有角色获得35%对应元素伤害加成,持续10秒。同时只能通过该效果获得一种元素伤害加成。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/berserker/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "战狂",
"max_rarity": 4,
"2-piece_bonus": "暴击率提高12%。",
"4-piece_bonus": "生命值低于70%时,暴击率额外提升24%。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/blizzard-strayer/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "冰风迷途的勇士",
"max_rarity": 5,
"2-piece_bonus": "获得15%冰元素伤害加成。",
"4-piece_bonus": "攻击处于冰元素影响下的敌人时,暴击率提高20%;若敌人处于冻结状态下,则暴击率额外提高20%。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/bloodstained-chivalry/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "染血的骑士道",
"max_rarity": 5,
"2-piece_bonus": "造成的物理伤害提高25%。",
"4-piece_bonus": "击败敌人后的10秒内,释放重击时不消耗体力,且重击造成的伤害提升50%。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/brave-heart/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "勇士之心",
"max_rarity": 4,
"2-piece_bonus": "攻击力提高18%。",
"4-piece_bonus": "对生命值高于50%的敌人,造成的伤害增加30%。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/crimson-witch-of-flames/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "炽烈的炎之魔女",
"max_rarity": 5,
"2-piece_bonus": "获得15%火元素伤害加成。",
"4-piece_bonus": "超载、燃烧反应造成的伤害提升40%,蒸发、融化反应的加成系数提高15%。释放元素战技后的10秒内,二件套的效果提高50%,改效果最多叠加3次。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/deepwood-memories/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Deepwood Memories",
"max_rarity": 5,
"2-piece_bonus": "Dendro DMG Bonus +15%",
"4-piece_bonus": "After Elemental Skills or Bursts hit opponents, the targets' Dendro RES will be decreased by 30% for 8s. This effect can be triggered even if the equipping character is not on the field."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/defender-s-will/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "守护之心",
"max_rarity": 4,
"2-piece_bonus": "防御力提高30%。",
"4-piece_bonus": "队伍里每有不同一种元素类型的自己的角色,自身获得30%相应的元素抗性。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/desert-pavilion-chronicle/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Desert Pavilion Chronicle",
"max_rarity": 5,
"2-piece_bonus": "Anemo DMG Bonus +15%",
"4-piece_bonus": "When Charged Attacks hit opponents, the equipping character's Normal Attack SPD will increase by 10% while Normal, Charged, and Plunging Attack DMG will increase by 40% for 15s."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/echoes-of-an-offering/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Echoes of an Offering",
"max_rarity": 5,
"2-piece_bonus": "ATK +18%",
"4-piece_bonus": "When Normal Attacks hit opponents, there is a 36% chance that it will trigger Valley Rite, which will increase Normal Attack DMG by 70% of ATK. \nThis effect will be dispelled 0.05s after a Normal Attack deals DMG. \nIf a Normal Attack fails to trigger Valley Rite, the odds of it triggering the next time will increase by 20%. \nThis trigger can occur once every 0.2s."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/emblem-of-severed-fate/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "绝缘之旗印",
"max_rarity": 5,
"2-piece_bonus": "元素充能效率提高20%。",
"4-piece_bonus": "基于元素充能效率的25%,提高元素爆发造成的伤害,至多通过这种方式获得75%提升。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/flower-of-paradise-lost/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Flower of Paradise Lost",
"max_rarity": 5,
"2-piece_bonus": "Increases Elemental Mastery by 80",
"4-piece_bonus": "The equipping character's Bloom, Hyperbloom, and Burgeon reaction DMG are increased by 40%. Additionally, after the equipping character triggers Bloom, Hyperbloom, or Burgeon, they will gain another 25% bonus to the effect mentioned prior. Each stack of this lasts 10s. Max 4 stacks simultaneously. This effect can only be triggered once per second. The character who equips this can still trigger its effects when not on the field."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/gambler/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "赌徒",
"max_rarity": 4,
"2-piece_bonus": "元素战技造成的伤害提升20%。",
"4-piece_bonus": "打倒敌人时,有100%概率清除元素战技的冷却时间,该效果每15秒至多触发一次。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/gilded-dreams/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Gilded Dreams",
"max_rarity": 5,
"2-piece_bonus": "Elemental Mastery +80",
"4-piece_bonus": "Within 8s of triggering an Elemental Reaction, the character equipping this will obtain buffs based on the Elemental Type of the other party members, ATK is increased by 14% for each party member whose Elemental Type is the same as the equipping character, and Elemental Mastery is increased by 50 for every party member with a different Elemental Type. Each of the aforementioned buffs will count up to 3 characters. This effect can be triggered once every 8s. The character who equips this can still trigger its effects when not on the field."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/glacier-and-snowfield/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "冰之川与雪之砂",
"max_rarity": 5,
"2-piece_bonus": "获得15冰元素伤害加成(未上线)。",
"4-piece_bonus": "超导反应造成伤害提升100%,融化反应加成系数提升15%,释放元素战技后10秒内,冰元素伤害加成额外提升30%。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/gladiator-s-finale/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "角斗士的终幕礼",
"max_rarity": 5,
"2-piece_bonus": "攻击力提高18%。",
"4-piece_bonus": "装备该圣遗物套装的角色为单手剑、双手剑、长柄武器角色时,角色普通攻击造成的伤害提高35%。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/golden-troupe/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Golden Troupe",
"max_rarity": 5,
"2-piece_bonus": "Increases Elemental Skill DMG by 20%.",
"4-piece_bonus": "Increases Elemental Skill DMG by 25%. Additionally, when not on the field, Elemental Skill DMG will be further increased by 25%. This effect will be cleared 2s after taking the field."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/heart-of-depth/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "沉沦之心",
"max_rarity": 5,
"2-piece_bonus": "获得15%水元素伤害加成。",
"4-piece_bonus": "施放元素战技后的15秒内,普通攻击与重击造成的伤害提高30%。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/husk-of-opulent-dreams/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "华馆梦醒形骸记",
"max_rarity": 5,
"2-piece_bonus": "防御力提高30%。",
"4-piece_bonus": "装备此圣遗物套装的角色在以下情况下,将获得「问答」效果:在场上用岩元素攻击命中敌人后获得一层,每0.3秒至多触发一次;在队伍后台中,每3秒获得一层,问答最多叠加4层,每层能提供6%防御力与6%岩元素伤害加成。每6秒,若未获得问答效果,将损失一层。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/instructor/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "教官",
"max_rarity": 4,
"2-piece_bonus": "元素精通提高80点。",
"4-piece_bonus": "触发元素反应后,队伍中所有角色的元素精通提高120点,持续8秒。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/lavawalker/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "渡过烈火的贤人",
"max_rarity": 5,
"2-piece_bonus": "火元素抗性提高40%。",
"4-piece_bonus": "对处于火元素影响下的敌人造成的伤害提升35%。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/lucky-dog/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "幸运儿",
"max_rarity": 3,
"2-piece_bonus": "防御力提高100点。",
"4-piece_bonus": "拾取摩拉时,恢复300点生命值。"
}
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/data/artifacts/maiden-beloved/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "被怜爱的少女",
"max_rarity": 5,
"2-piece_bonus": "角色造成的治疗效果提升15%。",
"4-piece_bonus": "施放元素战技或元素爆发后的10秒内,队伍中所有角色受治疗效果加成提高20%。"
}
7 changes: 7 additions & 0 deletions assets/data/artifacts/marechaussee-hunter/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Marechaussee Hunter",
"max_rarity": 5,
"2-piece_bonus": "Normal and Charged Attack DMG +15%.",
"4-piece_bonus": "When current HP increases or decreases, CRIT Rate will be increased by 12% for 5s. Max 3 stacks."
}

6 changes: 6 additions & 0 deletions assets/data/artifacts/martial-artist/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "武人",
"max_rarity": 4,
"2-piece_bonus": "普通攻击与重击造成的伤害提高15%。",
"4-piece_bonus": "施放元素战技后的8秒内,普通攻击和重击造成的伤害提升25%。"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nighttime Whispers in the Echoing Woods",
"max_rarity": 5,
"2-piece_bonus": "ATK +18%",
"4-piece_bonus": "After using an Elemental Skill, gain a 20% Geo DMG Bonus for 10s. While under a shield granted by the Crystallize reaction, the above effect will be increased by 150%, and this additional increase disappears 1s after that shield is lost."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/noblesse-oblige/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "昔日宗室之仪",
"max_rarity": 5,
"2-piece_bonus": "元素爆发造成的伤害提升20%。",
"4-piece_bonus": "释放元素爆发后,队伍中所有角色攻击力提升20%,持续12秒,该效果不可叠加。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/nymph-s-dream/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nymph's Dream",
"max_rarity": 5,
"2-piece_bonus": "Hydro DMG Bonus +15%",
"4-piece_bonus": "After Normal, Charged, and Plunging Attacks, Elemental Skills, and Elemental Bursts hit opponents, 1 stack of Mirrored Nymph will be triggered, lasting 8s. When under the effect of 1, 2, or 3, or more Mirrored Nymph stacks, ATK will be increased by 7%/16%/25%, and Hydro DMG will be increased by 4%/9%/15%. Mirrored Nymph stacks created by Normal, Charged, and Plunging Attacks, Elemental Skills, and Elemental Bursts exist independently."
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/ocean-hued-clam/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "海染砗磲",
"max_rarity": 5,
"2-piece_bonus": "治疗加成提高15%。",
"4-piece_bonus": "装备此圣遗物套装的角色对队伍中的角色进行治疗时,将产生持续3秒的海染泡沫,记录治疗的生命值回复量(包括溢出值)。持续时间结束时,海染泡沫将会爆炸,对周围敌人造成90%累积回复量的伤害(该伤害结算方式同感电、超导等元素反应,但不受元素精通、等级或反应伤害加成效果影响)。每3.5秒至多产生一个海染泡沫;海染泡沫至多记录30000点回复量,含溢出部分的治疗量;自己的队伍中至多存在一个海染泡沫。装备此圣遗物套装的角色处于队伍后台时;依然能触发该效果。"
}
6 changes: 6 additions & 0 deletions assets/data/artifacts/pale-flame/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "苍白之火",
"max_rarity": 5,
"2-piece_bonus": "造成物理伤害提高15%。",
"4-piece_bonus": "元素战技命中敌人后,攻击力提升9%。该效果持续7秒,至多叠加2层,每0.3秒至多触发一次。叠满2层时,2件套的效果提升100%。"
}
File renamed without changes.
5 changes: 5 additions & 0 deletions assets/data/artifacts/prayers-for-destiny/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "祭水之人",
"max_rarity": 4,
"1-piece_bonus": "受到水元素附着效果的持续时间减少40%。"
}
2 changes: 1 addition & 1 deletion assets/data/artifacts/prayers-for-illumination/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"name": "Prayers for Illumination",
"max_rarity": 4,
"1-piece_bonus": "Affected by Pyro for 40% less time."
}
}
5 changes: 5 additions & 0 deletions assets/data/artifacts/prayers-for-illumination/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "祭火之人",
"max_rarity": 4,
"1-piece_bonus": "受到火元素附着效果的持续时间减少40%。"
}
2 changes: 1 addition & 1 deletion assets/data/artifacts/prayers-for-wisdom/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"name": "Prayers for Wisdom",
"max_rarity": 4,
"1-piece_bonus": "Affected by Electro for 40% less time."
}
}
5 changes: 5 additions & 0 deletions assets/data/artifacts/prayers-for-wisdom/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "祭雷之人",
"max_rarity": 4,
"1-piece_bonus": "受到雷元素附着效果的持续时间减少40%。"
}
2 changes: 1 addition & 1 deletion assets/data/artifacts/prayers-to-springtime/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"name": "Prayers to Springtime",
"max_rarity": 4,
"1-piece_bonus": "Affected by Cryo for 40% less time."
}
}
5 changes: 5 additions & 0 deletions assets/data/artifacts/prayers-to-springtime/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "祭冰之人",
"max_rarity": 4,
"1-piece_bonus": "受到的冰元素附着效果的持续时间减少40%。"
}
5 changes: 5 additions & 0 deletions assets/data/artifacts/prayers-to-the-firmament/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "祭风之人",
"max_rarity": 4,
"1-piece_bonus": "受到风元素附着效果的持续时间减少40%(未上线,甚至可能不存在)。"
}
8 changes: 4 additions & 4 deletions assets/data/artifacts/resolution-of-sojourner/es.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Corazón del Viajero",
"max_rarity": 4,
"2-piece_bonus": "ATQ +18%.",
"4-piece_bonus": "La Prob. CRIT de los Ataques Cargados aumenta en un 30%."
"name": "Corazón del Viajero",
"max_rarity": 4,
"2-piece_bonus": "ATQ +18%.",
"4-piece_bonus": "La Prob. CRIT de los Ataques Cargados aumenta en un 30%."
}
Loading

0 comments on commit ab8a38f

Please sign in to comment.