0.0.6 • Published 7 years ago

studentbostader-api v0.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Studentbostäder API for Node JS

A fully async API written in ES6 for retrieval of student accommodations


npm badge

Setting up

Installing
npm install studentbostader-api
Quickstart
const api = require('studentbostader-api');

// Fetch all available accommodations
api.fetchAccommodations()
.then(accommodations => {
  for (const accommodation of accommodations) {
    console.log(accommodation.address);
  }
});

Available values

propertydescriptiontypenote
imageAn url to an image of the listingstring
addressThe addressstring
locationThe name of the neighborhood / locationstring
paymentTypeText explaining type of paymentstringI.e "Hyra" (monthly rent)
rentThe cost of the paymentnumber
rentUnitUnit of rentstringTypically 'kr/mån'
typeType of accommodationstringI.e. 'Korridorsrum', 'Lägenhet'
typeUnitUnit of typestringTypically 'Storlek/Typ'
areaNumber of square metersnumber
availableDate of availabilitystringIn the 'YYYY-MM-DD' format. I.e. '2017-05-01'
urlUrl to the listingstring
textText related to the listingstringUsually "sells" the location and accommodation
publicationTextsList of texts related to the listingarray of stringsUnkown usage
descriptionUsually a short description of the listingstringI.e. 'Ej möblerad'
idId of the listingnumberReference id for the listing
pointsRequired queue points to be eligiblenumber
advertTypeUnknown usage
directlyAvailableWhether or not the accommodation is listed as 'Boende Direkt'bool

Contributing

Any contribution is welcome. If you're not able to code it yourself, perhaps someone else is - so post an issue if there's anything on your mind.

Development

Clone the repository:

git clone https://github.com/AlexGustafsson/studentbostader-api.git && cd studentbostader-api

Set up for development:

npm install

Follow the conventions enforced:

npm test

Disclaimer

Although the project is very capable, it is not built with production in mind. Therefore there might be complications when trying to use the API for large-scale projects meant for the public. The API was created to easily fetch available student accommodations programmatically and as such it might not promote best practices nor be performant. This project is not in any way affiliated with Studentbostäder.

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago