https://github.com/timmikeladze/animal-crossing-api
GraphQL API for Animal Crossing New Horizon items, villagers, fish, etc.
https://github.com/timmikeladze/animal-crossing-api
animal-crossing api graphql
Last synced: 3 months ago
JSON representation
GraphQL API for Animal Crossing New Horizon items, villagers, fish, etc.
- Host: GitHub
- URL: https://github.com/timmikeladze/animal-crossing-api
- Owner: TimMikeladze
- Created: 2021-04-19T04:32:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-24T21:25:01.000Z (over 5 years ago)
- Last Synced: 2026-02-27T01:51:11.470Z (5 months ago)
- Topics: animal-crossing, api, graphql
- Language: TypeScript
- Homepage: https://animal-crossing-api.vercel.app
- Size: 2.86 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Animal Crossing API
A GraphQL API for Animal Crossing New Horizon items, villagers, fish, etc.
https://animal-crossing-api.vercel.app - Demo & Documentation
https://animal-crossing-api.vercel.app/api/graphql - GraphQL endpoint.
## Query examples
**Top 5 hardest fish to catch**
```graphql
{
fishes(first: 5, filter: { catchDifficulty: { equalTo: "Very Hard" } }) {
id
name
description
catchphrase
color1
color2
spawnRates
whereHow
catchDifficulty
}
}
```
**Villagers with birthdays in June or July sorted by birthday and name**
```graphql
{
villagersWithSummerBirthdays: villagers(
filter: {
or: [{ birthday: { like: "6/%" } }, { birthday: { like: "7/%" } }]
}
orderBy: [BIRTHDAY_ASC, NAME_ASC]
) {
id
birthday
name
favoriteSong
hobby
personality
species
subtype
}
}
```
**All seasons and events**
```graphql
{
seasonsAndEvents {
id
name
unlockDate
unlockMethod
datesNorthernHemisphere
year
displayName
datesSouthernHemisphere
internalLabel
nodeId
type
uniqueEntryId
versionLastUpdated
versionAdded
}
}
```
## How it works
The data is provided by the community made [Data Spreadsheet for Animal Crossing New Horizons](https://docs.google.com/spreadsheets/d/13d_LAJPlxMa_DubPTuirkIV4DERBMXbrWQsmSh8ReK4/).
The XLSX spreadsheet is fetched and converted into JSON. After some data massaging the schema for each sheet is determined and relevant
Postgres tables are created and populated with data.
Using PostGraphile a read only GraphQL API is automatically generated by introspecting the Postgres database structure.