# studentbostader-api

> An API to retrieve student accommondations from studentbostader.se

Latest version **0.0.6** (published 2017-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install studentbostader-api
pnpm add studentbostader-api
yarn add studentbostader-api
bun add studentbostader-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-09-04 |
| First published | 2017-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Gustafsson |
| Maintainers | alexgustafsson |

## Links

- npm: https://www.npmjs.com/package/studentbostader-api
- Repository: https://github.com/alexgustafsson/studentbostader-api
- Homepage: https://github.com/alexgustafsson/studentbostader-api#readme
- Issues: https://github.com/alexgustafsson/studentbostader-api/issues
- npm.io page: https://npm.io/package/studentbostader-api

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.16.0
- [parse-json](https://npm.io/package/parse-json.md) ^2.2.0

## Recent versions

- 0.0.6 (latest) — 2017-09-04
- 0.0.5 — 2017-06-13
- 0.0.4 — 2017-04-23
- 0.0.3 — 2017-04-05
- 0.0.2 — 2017-04-05
- 0.0.1 — 2017-04-05

## README

# Studentbostäder API for Node JS
### A fully async API written in ES6 for retrieval of student accommodations
***
![npm badge](https://img.shields.io/npm/v/studentbostader-api.svg)

### Setting up

##### Installing

```
npm install studentbostader-api
```

##### Quickstart

```JavaScript
const api = require('studentbostader-api');

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

### Available values

| property | description | type | note |
| -------- | ----------- | ---- | ---- |
| image | An url to an image of the listing | string |  |
| address | The address | string |  |
| location | The name of the neighborhood / location | string |  |
| paymentType | Text explaining type of payment | string | I.e "Hyra" (monthly rent) |
| rent | The cost of the payment | number |  |
| rentUnit | Unit of `rent` | string | Typically 'kr/mån' |
| type | Type of accommodation | string | I.e. 'Korridorsrum', 'Lägenhet' |
| typeUnit | Unit of `type` | string | Typically 'Storlek/Typ' |
| area | Number of square meters | number |  |
| available | Date of availability | string | In the 'YYYY-MM-DD' format. I.e. '2017-05-01' |
| url | Url to the listing | string |  |
| text | Text related to the listing | string | Usually "sells" the location and accommodation |
| publicationTexts | List of texts related to the listing | array of strings | Unkown usage |
| description | Usually a short description of the listing | string | I.e. 'Ej möblerad' |
| id | Id of the listing | number | Reference id for the listing |
| points | Required queue points to be eligible | number |  |
| advertType |  |  | Unknown usage |
| directlyAvailable | Whether 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._

---
_Source: https://npm.io/package/studentbostader-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
