condos
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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';
  1. 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);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i condos

Weekly Downloads

7

Version

0.1.0

License

MIT

Unpacked Size

5.44 kB

Total Files

3

Last publish

Collaborators

  • stephenpoole