Skip to content

Commit

Permalink
feat: Add totalarea
Browse files Browse the repository at this point in the history
  • Loading branch information
jroehl committed Oct 31, 2021
1 parent 765bfb8 commit 5783ec5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.20.1
v12.13.0
1 change: 1 addition & 0 deletions src/classes/portals/Estate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export interface RealEstateDetailedProperties {
parkingSpaceType: string;
patio: boolean;
plotArea: number;
totalArea: number;
residentialUnits: number;
summerResidencePractical: boolean;
usableFloorSpace: number;
Expand Down
7 changes: 3 additions & 4 deletions src/classes/portals/FlowFact/v1/Estate.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { get } from 'lodash';

import {
Price,
Address,
Attachment,
Estate,
RealEstateProperties,
Estate, Price, RealEstateProperties
} from '../../Estate';


export class FlowFactEstateV1 extends Estate {
protected async parse(): Promise<RealEstateProperties> {
return {
Expand Down Expand Up @@ -73,6 +71,7 @@ export class FlowFactEstateV1 extends Estate {
parkingSpaceType: this.getValue('parkingSpaceType'),
patio: this.getValue('patio'),
plotArea: this.getValue('plotArea'),
totalArea: this.getValue('totalArea'),
residentialUnits: this.getValue('residentialUnits'),
summerResidencePractical: this.getValue('summerResidencePractical'),
usableFloorSpace: this.getValue('usableFloorSpace'),
Expand Down
1 change: 1 addition & 0 deletions src/classes/portals/FlowFact/v2/Estate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class FlowFactEstateV2 extends Estate {
externalID: this.getValue('identifier.values[0]'),
internalID: this.getValue('_metadata.id'),
livingSpace: this.getValue('livingarea.values[0]'),
totalArea: this.getValue('totalarea.values[0]'),
numberOfRooms: this.getValue('rooms.values[0]'),
price: this.getPrice(),
title: this.getTranslatableValue('headline.values[0]'),
Expand Down
7 changes: 3 additions & 4 deletions src/classes/portals/Immobilienscout24/Estate.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { get } from 'lodash';

import {
Price,
Address,
Attachment,
Estate,
RealEstateProperties,
Estate, Price, RealEstateProperties
} from '../Estate';


export class Immobilienscout24Estate extends Estate {
protected async parse(): Promise<RealEstateProperties> {
const estateType = this.getEstateType();
Expand Down Expand Up @@ -62,6 +60,7 @@ export class Immobilienscout24Estate extends Estate {
parkingSpaceType: this.getTranslatableValue('parkingSpaceType'),
patio: this.getTranslatableValue('patio'),
plotArea: this.getTranslatableValue('plotArea'),
totalArea: this.getTranslatableValue('totalArea'),
residentialUnits: this.getTranslatableValue('residentialUnits'),
summerResidencePractical: this.getTranslatableValue(
'summerResidencePractical'
Expand Down
1 change: 1 addition & 0 deletions src/lib/get-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Detailed implements RealEstateDetailedProperties {
parkingSpaceType!: string;
patio!: boolean;
plotArea!: number;
totalArea!: number;
residentialUnits!: number;
summerResidencePractical!: boolean;
usableFloorSpace!: number;
Expand Down

0 comments on commit 5783ec5

Please sign in to comment.