0.1.0 • Published 4 years ago

condos v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Condos

npm version Known Vulnerabilities Build Status codecov

Condos is a promise-based Node.js library for the Condos.ca api.

Installation

Install condos and save to your package.json in one easy step.

With npm:

npm install condos --save

With yarn:

yarn add condos

Documentation

You may find the Condos documentation here.

Usage

1) Import Condos into your application:

import Condos from 'condos';

2) Call an api method to request data:

With Promises:

import Condos, { 
    Precision,
    GroupType,
    OfferType,
    NeighbourhoodTorontoDowntown,
    NeighbourhoodTorontoEastEnd,
    SublocalityToronto
} from 'condos';

Condos.listings({
    precision: Precision.Normal,
    neighbourhood: [
        NeighbourhoodTorontoDowntown.KingWest,
        NeighbourhoodTorontoEastEnd.EastEndDanforth,
    ],
    sublocality: [SublocalityToronto.Etobicoke],
    groupBy: GroupType.Neighbourhood,
    offer: OfferType.Sale,
}).then(data => {
  console.log(data);
});

With async/await:

import Condos, { 
    Precision,
    GroupType,
    OfferType,
    NeighbourhoodTorontoDowntown,
    NeighbourhoodTorontoEastEnd,
    SublocalityToronto
} from 'condos';

(async () => {
  const data = await Condos.listings({
      precision: Precision.Normal,
      neighbourhood: [
          NeighbourhoodTorontoDowntown.KingWest,
          NeighbourhoodTorontoEastEnd.EastEndDanforth,
      ],
      sublocality: [SublocalityToronto.Etobicoke],
      groupBy: GroupType.Neighbourhood,
      offer: OfferType.Sale,
  });
  console.log(data);
})();
0.1.0

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago