Skip to content

Commit

Permalink
v0.4.8: Added Mirabilandia, moved Bobbejaanland, improved Movie Park …
Browse files Browse the repository at this point in the history
…(Halloween)
  • Loading branch information
timyboy12345 committed Nov 11, 2023
1 parent 067adec commit 27703e5
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 219 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themeparks-node-api",
"version": "0.4.7",
"version": "0.4.8",
"description": "An API which can retrieve theme park wait times.",
"author": "Tim Arendsen",
"private": false,
Expand Down
5 changes: 4 additions & 1 deletion src/_services/parks/parks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { HellendoornService } from '../../parks/hellendoorn/hellendoorn.service'
import { LegolandDeutschlandService } from '../../parks/legoland/legoland-deutschland/legoland-deutschland.service';
import { CompanyService } from '../company/company.service';
import { SixflagsService } from '../../parks/sixflags/sixflags.service';
import { BobbejaanlandService } from '../../parks/bobbejaanland/bobbejaanland.service';
import { BobbejaanlandService } from '../../parks/parques-reunidos/bobbejaanland/bobbejaanland.service';
import { PlopsalandDePanneService } from '../../parks/plopsaland/plopsaland-de-panne/plopsaland-de-panne.service';
import { HansaParkService } from '../../parks/hansa-park/hansa-park.service';
import { OuwehandsDierenparkService } from '../../parks/ouwehands-dierenpark/ouwehands-dierenpark.service';
Expand Down Expand Up @@ -57,6 +57,7 @@ import { HersheyparkService } from '../../parks/hersheypark/hersheypark.service'
import { SeaworldService } from '../../parks/seaworld/seaworld.service';
import { UniversalService } from '../../parks/universal/universal.service';
import { GardalandService } from '../../parks/gardaland/gardaland.service';
import { MirabilandiaService } from '../../parks/parques-reunidos/mirabilandia/mirabilandia.service';

@Injectable()
export class ParksService {
Expand Down Expand Up @@ -115,6 +116,7 @@ export class ParksService {
private readonly _seaworldCompanyService: SeaworldService,
private readonly _universalService: UniversalService,
private readonly _gardaland: GardalandService,
private readonly _mirabilandia: MirabilandiaService,
) {
this._parks = [];
this._parks.push(_eftelingService);
Expand Down Expand Up @@ -161,6 +163,7 @@ export class ParksService {
this._parks.push(_futuroscope);
this._parks.push(_hersheypark);
this._parks.push(_gardaland)
this._parks.push(_mirabilandia)

this._companies = [];
this._companies.push(_sixflagsService);
Expand Down
2 changes: 1 addition & 1 deletion src/_services/themepark/theme-park.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class ThemeParkService {
}

async getHalloweenEvents(): Promise<Poi[]> {
throw new NotImplementedException("Could not get animals");
throw new NotImplementedException("Could not get halloween events");
}

async getHalloweenEvent(id: string): Promise<Poi> {
Expand Down
19 changes: 0 additions & 19 deletions src/parks/bobbejaanland/bobbejaanland.module.ts

This file was deleted.

105 changes: 0 additions & 105 deletions src/parks/bobbejaanland/bobbejaanland.service.ts

This file was deleted.

This file was deleted.

5 changes: 2 additions & 3 deletions src/parks/parks.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { SixflagsModule } from './sixflags/sixflags.module';
import { BellewaerdeModule } from './bellewaerde/bellewaerde.module';
import { HellendoornModule } from './hellendoorn/hellendoorn.module';
import { LegolandModule } from './legoland/legoland.module';
import { BobbejaanlandModule } from './bobbejaanland/bobbejaanland.module';
import { PlopsalandDePanneModule } from './plopsaland/plopsaland-de-panne/plopsaland-de-panne.module';
import { EuropaParkModule } from './europa-park/europa-park.module';
import { HansaParkModule } from './hansa-park/hansa-park.module';
Expand Down Expand Up @@ -42,7 +41,7 @@ import { UniversalModule } from './universal/universal.module';
import { GardalandModule } from './gardaland/gardaland.module';

@Module({
exports: [EftelingModule, ToverlandModule, PhantasialandModule, ParcAsterixModule, HolidayParkModule, DippiedoeModule, DisneyModule, WalibiModule, PortaventuraModule, SixflagsModule, BellewaerdeModule, HellendoornModule, LegolandModule, BobbejaanlandModule, PlopsalandDePanneModule, EuropaParkModule, HansaParkModule, OuwehandsDierenparkModule, WildlandsModule, LisebergModule, HerschendModule, CedarfairModule, ParqueWarnerModule, GronaLundModule, TivoliModule, ThorpeParkModule, AltonTowersModule, PaultonsParkModule, SanDiegoZooModule, ChessingtonResortModule, BlijdorpModule, ApenheulModule, EnergylandiaModule, FamilyparkModule, BeekseBergenModule, ParquesReunidosModule, FuturoscopeModule, HersheyparkModule, SeaworldModule, UniversalModule, GardalandModule],
imports: [EftelingModule, ToverlandModule, PhantasialandModule, ParcAsterixModule, HolidayParkModule, DippiedoeModule, DisneyModule, WalibiModule, PortaventuraModule, SixflagsModule, BellewaerdeModule, HellendoornModule, LegolandModule, BobbejaanlandModule, PlopsalandDePanneModule, EuropaParkModule, HansaParkModule, OuwehandsDierenparkModule, WildlandsModule, LisebergModule, HerschendModule, CedarfairModule, ParqueWarnerModule, GronaLundModule, TivoliModule, ThorpeParkModule, AltonTowersModule, PaultonsParkModule, SanDiegoZooModule, ChessingtonResortModule, BlijdorpModule, ApenheulModule, EnergylandiaModule, FamilyparkModule, BeekseBergenModule, ParquesReunidosModule, FuturoscopeModule, HersheyparkModule, SeaworldModule, UniversalModule, GardalandModule],
exports: [EftelingModule, ToverlandModule, PhantasialandModule, ParcAsterixModule, HolidayParkModule, DippiedoeModule, DisneyModule, WalibiModule, PortaventuraModule, SixflagsModule, BellewaerdeModule, HellendoornModule, LegolandModule, PlopsalandDePanneModule, EuropaParkModule, HansaParkModule, OuwehandsDierenparkModule, WildlandsModule, LisebergModule, HerschendModule, CedarfairModule, ParqueWarnerModule, GronaLundModule, TivoliModule, ThorpeParkModule, AltonTowersModule, PaultonsParkModule, SanDiegoZooModule, ChessingtonResortModule, BlijdorpModule, ApenheulModule, EnergylandiaModule, FamilyparkModule, BeekseBergenModule, ParquesReunidosModule, FuturoscopeModule, HersheyparkModule, SeaworldModule, UniversalModule, GardalandModule],
imports: [EftelingModule, ToverlandModule, PhantasialandModule, ParcAsterixModule, HolidayParkModule, DippiedoeModule, DisneyModule, WalibiModule, PortaventuraModule, SixflagsModule, BellewaerdeModule, HellendoornModule, LegolandModule, PlopsalandDePanneModule, EuropaParkModule, HansaParkModule, OuwehandsDierenparkModule, WildlandsModule, LisebergModule, HerschendModule, CedarfairModule, ParqueWarnerModule, GronaLundModule, TivoliModule, ThorpeParkModule, AltonTowersModule, PaultonsParkModule, SanDiegoZooModule, ChessingtonResortModule, BlijdorpModule, ApenheulModule, EnergylandiaModule, FamilyparkModule, BeekseBergenModule, ParquesReunidosModule, FuturoscopeModule, HersheyparkModule, SeaworldModule, UniversalModule, GardalandModule],
})
export class ParksModule {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing';
import { BobbejaanlandService } from './bobbejaanland.service';
import { ParquesReunidosTransfer } from '../parques-reunidos-transfer/parques-reunidos.transfer';
import { HttpModule } from '@nestjs/axios';
import { ConfigModule } from '@nestjs/config';

Expand All @@ -8,7 +9,7 @@ describe('BobbejaanlandService', () => {

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [BobbejaanlandService],
providers: [BobbejaanlandService, ParquesReunidosTransfer],
imports: [HttpModule, ConfigModule.forRoot()]
}).compile();

Expand All @@ -18,13 +19,4 @@ describe('BobbejaanlandService', () => {
it('should be defined', () => {
expect(service).toBeDefined();
});

it('should return info', () => {
expect(service.getInfo().id).toBeDefined();
});

it('should return a list of POIs', async () => {
const data = await service.getPois();
expect(data).toBeInstanceOf(Array);
});
});
42 changes: 42 additions & 0 deletions src/parks/parques-reunidos/bobbejaanland/bobbejaanland.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Injectable } from '@nestjs/common';
import { ParquesReunidosParkService } from '../parques-reunidos-park.service';
import { ParkType, ThemePark } from '../../../_interfaces/park.interface';

@Injectable()
export class BobbejaanlandService extends ParquesReunidosParkService {
getInfo(): ThemePark {
return {
timezone: 'Europe/Amsterdam',
name: 'Bobbejaanland',
parkType: ParkType.THEMEPARK,
image: 'https://www.bobbejaanland.be/content/dam/bjl/images/generals/KVDS-20190616-171430-NIKON%20D5-2.jpg',
countryCode: 'be',
description: 'Bobbejaanland is een pretpark in Lichtaart, gelegen tussen Herentals en Kasterlee in België, en is genoemd naar zijn oprichter Bobbejaan Schoepen. Het pretpark is gelegen in een moerassig gebied in de vallei van de Kleine Nete.',
id: 'bobbejaanland',
location: {
lat: 51.2009421,
lng: 4.9040014,
},
};
}

getStayEstablishment(): string {
return 'mGvE'
}

supportsRestaurants(): boolean {
return true;
}

getShowCategoryID(): string {
return '';
}

halloweenCategories(): (string | number)[] {
return []
}

getShowType(): 'new' | 'old' | 'unsupported' {
return 'unsupported';
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface AtraccionesResponseInterface {
'data': AtraccionesResponseInterface[]
'data': AtraccionesResponseAtraccioneInterface[]
}

export interface AtraccionesResponseAtraccioneInterface {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Test, TestingModule } from '@nestjs/testing';
import { MirabilandiaService } from './mirabilandia.service';
import { ParquesReunidosTransfer } from '../parques-reunidos-transfer/parques-reunidos.transfer';
import { HttpModule } from '@nestjs/axios';
import { ConfigModule } from '@nestjs/config';

describe('MirabilandiaService', () => {
let service: MirabilandiaService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [MirabilandiaService, ParquesReunidosTransfer],
imports: [HttpModule, ConfigModule.forRoot()]
}).compile();

service = module.get<MirabilandiaService>(MirabilandiaService);
});

it('should be defined', () => {
expect(service).toBeDefined();
});
});
Loading

0 comments on commit 27703e5

Please sign in to comment.