forked from phamtrisi/airapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathairbnb.js
38 lines (33 loc) · 1.09 KB
/
airbnb.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* airbnb Node wrapper for unofficial API
* @author Si Pham <phamtrisi@gmail.com>
*
* Support basic actions to interact with airbnb hostings
* - search() - Search for hostings given conditions
* - getInfo() - Get info about a hosting
* - getCalendar() - Get availability for a hosting
* - getEstIncome() - Get estimate income a hosting generates, by month
* - getReviews() - Get reviews for a given user, as host or guest
*/
var search = require("./api/search"),
getInfo = require("./api/getInfo"),
getCalendar = require("./api/getCalendar"),
getReviews = require("./api/getReviews"),
getEstIncome = require("./api/getEstIncome"),
login = require("./api/login");
var USERNAME = "username",
PASSWORD = "password";
var AirbnbClient = function(optionalConfigs) {
optionalConfigs = optionalConfigs || {};
return {
configs: optionalConfigs,
search: search,
getInfo: getInfo.getInfo,
getHistoricalData: getInfo.getHistoricalData,
getCalendar: getCalendar,
getReviews: getReviews,
getEstIncome: getEstIncome,
login: login
};
};
module.exports = AirbnbClient;