Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timyboy12345/themeparks-node-api
This repo exposes an API that simplifies theme park wait times endpoints and returns one single easy to understand format for all data types, from park information to waiting and show times.
https://github.com/timyboy12345/themeparks-node-api
nestjs themeparks
Last synced: 6 days ago
JSON representation
This repo exposes an API that simplifies theme park wait times endpoints and returns one single easy to understand format for all data types, from park information to waiting and show times.
- Host: GitHub
- URL: https://github.com/timyboy12345/themeparks-node-api
- Owner: timyboy12345
- Created: 2021-03-07T15:50:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-07T20:49:46.000Z (8 days ago)
- Last Synced: 2024-11-07T21:34:05.896Z (8 days ago)
- Topics: nestjs, themeparks
- Language: TypeScript
- Homepage: https://tp.arendz.nl/api
- Size: 21.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ก Themeparks API ๐ก
Using this API, you can request waiting times from theme parks all around the world. It communicates with public API's that the parks use internally for their apps.
Feel free to add new parks.
## Example
To view the API, please go to [the example API](https://tp.arendz.nl/api) at https://tp.arendz.nl. This API is always up-to-date with the latest master-branch of this repo.### Supported parks
In the table below you will find the parks that are currently supported and the functions that they support. This list of included and non-included functions is also included in the API.| Park | Type | Ride Support | Restaurants Support | Shows Support | Shops Support | Halloween Support |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| ๐ง๐ช Walibi Belgium | ๐ก | True | True | False | True | False |
| ๐ง๐ช Bellewaerde | ๐ก | True | True | True | True | False |
| ๐ง๐ช Bobbejaanland | ๐ก | True | True | False | True | False |
| ๐ง๐ช Plopsalande de Panne | ๐ก | True | True | True | True | False |
| ๐จ๐ฆ La Ronde, Montreal | ๐ก | True | True | True | True | False |
| ๐ฉ๐ช Phantasialand | ๐ก | True | True | True | True | False |
| ๐ฉ๐ช Holiday Park | ๐ก | True | True | True | True | False |
| ๐ฉ๐ช LegoLand Deutschland | ๐ก | False | False | False | False | False |
| ๐ฉ๐ช Hansa Park | ๐ก | True | True | True | True | False |
| ๐ฉ๐ช Movie Park Germany | ๐ก | True | True | True | True | True |
| ๐ฉ๐ฐ Tivoli | ๐ก | True | True | True | False | False |
| ๐ช๐ธ Portaventura | ๐ก | True | True | True | True | False |
| ๐ช๐ธ Ferrari Land | ๐ก | True | True | True | True | False |
| ๐ช๐ธ Parque Warner | ๐ก | True | True | True | True | False |
| ๐ช๐ธ Parque de Atracciones Madrid | ๐ก | True | False | True | True | False |
| ๐ช๐ธ Parque Warner Beach | ๐ | True | True | False | True | False |
| ๐ซ๐ท Walibi Rhรดne-Alpes | ๐ก | True | True | False | True | False |
| ๐ซ๐ท Disneyland Paris | ๐ก | True | True | True | True | False |
| ๐ซ๐ท Walt Disney Studios Park | ๐ก | True | True | True | True | False |
| ๐ซ๐ท Parc Asterix | ๐ก | True | True | True | False | False |
| ๐ซ๐ท Futuroscope | ๐ก | True | True | True | True | False |
| ๐ซ๐ท Marineland Cote D'azure | ๐ก | True | True | True | True | False |
| ๐ฌ๐ง Thorpe Park | ๐ก | True | True | True | True | False |
| ๐ฌ๐ง Alton Towers | ๐ก | True | True | True | True | False |
| ๐ฌ๐ง Paultons Park | ๐ก | True | True | True | True | False |
| ๐ฌ๐ง Chessington world of Adventures | ๐ก | True | True | True | True | False |
| ๐ฎ๐น Gardaland | ๐ก | True | True | True | False | False |
| ๐ฎ๐น Mirabilandia | ๐ก | True | True | False | True | False |
| ๐ณ๐ฑ Efteling | ๐ก | True | True | True | True | False |
| ๐ณ๐ฑ Toverland | ๐ก | True | True | True | False | True |
| ๐ณ๐ฑ Walibi Holland | ๐ก | True | True | False | True | False |
| ๐ณ๐ฑ DippieDoe | ๐ก | True | False | False | False | False |
| ๐ณ๐ฑ Hellendoorn | ๐ก | True | True | True | True | False |
| ๐ณ๐ฑ Ouwehands Dierenpark | ๐ฆ | False | False | False | False | False |
| ๐ณ๐ฑ Wildlands | ๐ฆ | False | False | False | False | False |
| ๐ณ๐ฑ Blijdorp | ๐ฆ | False | False | True | False | False |
| ๐ณ๐ฑ Apenheul | ๐ฆ | False | False | False | False | False |
| ๐ณ๐ฑ Safaripark Beekse Bergen | ๐ฆ | False | True | False | False | False |
| ๐ณ๐ฑ Speelland Beekse Bergen | ๐ก | True | False | False | False | False |
| ๐ต๐ฑ Energylandia | ๐ก | True | False | True | False | False |
| ๐ธ๐ช Liseberg | ๐ก | True | True | False | True | False |
| ๐ธ๐ช Grona Lund | ๐ก | True | False | False | False | False |
| ๐บ๐ธ Dollywood | ๐ก | True | False | False | False | False |
| ๐บ๐ธ Silver Dollar City | ๐ก | True | False | False | False | False |
| ๐บ๐ธ San Diego Zoo | ๐ฆ | True | True | True | True | False |
| ๐บ๐ธ Hersheypark | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Over Texas | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Over Georgia | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags St. Louis | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Great Adventure | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Magic Mountain | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Great America | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Fiesta Texas | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Arlington | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Los Angeles | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Chicago | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags America | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Discovery Kingdom | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags New England | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Jackson | ๐ | True | True | True | True | False |
| ๐บ๐ธ The Great Escape | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags White Water, Atlanta | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Mรฉxico | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Oaxtepec | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Concord | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Frontier City | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Oklahoma City | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Darien Lake | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Phoenix | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, SplashTown | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Hurricane Harbor, Rockford | ๐ | True | True | True | True | False |
| ๐บ๐ธ Six Flags Wild Safari, Jackson | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Canada's Wonderland | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Carowinds | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Cedar Point | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Dorney Park | ๐ก | True | True | True | True | False |
| ๐บ๐ธ California's Great Adventure | ๐ก | True | True | True | True | False |
| ๐บ๐ธ King's Dominion | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Kings Island | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Knotts Berry Farm | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Michigans Adventure | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Valley Fair | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Worlds of Fun | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Seaworld San Antonio | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Seaworld San Diego | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Seaworld Orlando | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Bush Gardens Tampa Bay | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Bush Gardens Williamsburg | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Sesame Place Philadelphia | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Sesame Place San Diego | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Universal Studios Orlando | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Islands of Adventure | ๐ก | True | True | True | True | False |
| ๐บ๐ธ Universal Studios Hollywood | ๐ก | True | True | True | True | False |## Parks on the planning
UK: Pleasure Beach, LegoLand Windsor, Drayton Manor
IT: Cincetitta World, **Mirabilandia**
ES: Puy de Fou Espana
DE: Europapark, Rulantica, Heidi Park
OO: Familypark
FR: Puy de Fou
DM: Legoland Billund, Djurs Sommerland, Farup Sommerland## Description
This API was build using the [Nest](https://github.com/nestjs/nest) framework. Find the docs at the [NestJS Documentation](https://docs.nestjs.com/)
## Running the app
```bash
# development
npm run start# watch mode
npm run start:dev# production mode
npm run start:prod
```## Adding a new park
If you have access to an API of a theme park/resort that is not yet included, you can include it yourself and create a pull request, or create an issue with all details needed to integrate the park (API Keys, URLs, ...)### Structure
To keep the code easy to understand, there is a structure to the files. This is used for all parks. If the park you're adding is part of a resort, the contents is placed within a folder named after the resort (for example `disney`)
```text
...
src
+-- _dtos # The dto files for API documentation
+-- ...
+-- _interfaces # The global interface and enum files
+-- ...
+-- _services # The global services
+-- ...
+-- controllers # All HTTP controllers
+-- database # All models and repositories for the database connection
+-- parks
+-- {PARK_NAME} # The folder in which all files will be located
+-- interfaces # All interfaces for this park
+-- ...
+-- {PARK_NAME}-transfer # A service which is used to translate park-provided objects to the POI interface structure
+-- {PARK_NAME}-transfer.service.spec.ts
+-- {PARK_NAME}-transfer.service.ts
+-- data # A folder which contains static assets if no API is available for this data
+-- ...
+-- {PARK_NAME}.service.spec.ts # All tests for this park
+-- {PARK_NAME}.service.ts # The service for this park, which extends theme-park.service.ts
+-- schedules # All cron-jobs
...
```After the right files have been added, the park has to be added to the constructor of `parks.service.ts` so Nest knows the park exists and is ready to be included with the other parks.
### Using other services
Some parks use a single API URL to return all data. For these parks, the `through-pois-theme-park.service.ts` file was created. This service can be usefull if a park returns data from for example `restaurants`, `rides` and `shows` in a single response. This way, you don't have to create all the methods by hand, but just implement the `getPois()` method.Some parks use services provided by [themeparks.io](https://attractions.io). For these parks, a specific service was created called `themeparks-io-theme-park.service.ts`. This service can easily implement new themeparks.io parks by providing some basic information, since all data is returned in a standardized format.
### Attractions IO
Some parks use a service provided by attractions io. For these parks, a special `AioThemeparkService` was created. You need a few details from the app, including API key and build details, and you can include the park in the API.## Formats
The API returns parks, restaurants, rides and others points of interest (POIs) in a standardized way, these are detailed below.
### Park Format
```typescript
export interface ThemePark {
id: string;
name: string;
description: string;
image: string;
countryCode: string;
supports?: ThemeParkSupports;
}
```### Poi Format
```typescript
export interface Poi {
id: string;
category: PoiCategory;
rideCategory?: RideCategory;
original_category?: string;
title: string;
subTitle?: string;
description?: string;
area?: string;
createdAt?: string;
location?: {
lat: number,
lng: number
},
entrance?: {
id?: string,
world?: {
lat: number,
lng: number
},
map?: {
lat: number,
lng: number
}
};
exit?: {
id?: string,
world?: {
lat: number,
lng: number
},
map?: {
lat: number,
lng: number
}
};
maxAge?: string;
maxSize?: string;
minAge?: number;
minSize?: number;
minSizeEscort?: number;
tags?: string[];
image_url?: string;
website_url?: string;
fastpass?: boolean;
singlerider?: boolean;
featured?: boolean;
photoPoint?: boolean;images?: string[];
waitingTimes?: WaitingTimes;
showTimes?: ShowTimes;
openingTimes?: PoiOpeningTime[];
original: any;
}```
### Api URLs
Since the data of themeparks is copyrighted, API url's aren't included in this documentation. These can be retrieved by doing some research on your own and filling out the `.env` file.