-
Notifications
You must be signed in to change notification settings - Fork 0
Data Models
Simple data model used to index apartments. Example:
{
"_id" : "airbnb18518194",
"url" : "https://www.airbnb.es/rooms/18518194",
"provider": "airbnb",
"lnglat" : {
"type" : "Point",
"coordinates" : [
-1.899254159609465,
43.32194113611966
]
}
"author": "your_user",
"date": ISODate("2012-12-19T06:01:17.171Z"),
}
_id
: String, required.
url
: String, required.
lnglat
: Geopoint, required. type
must be "Point", and coordinates
are [longitude, latitude] as float type.
author
: String, required.
date
: ISODate, optional. If you doesnt provide one, it will be filled with current datetime (server UTC)
Extended apartment model with apartment's scrapped information. Example:
{
"_id" : "airbnb4224418",
"img" : "https://a0.muscache.com/im/pictures/53073874/6b5ff620_original.jpg?aki_policy=medium",
"url" : "https://www.airbnb.es/rooms/4224418",
"capacity" : 2,
"lnglat" : {
"coordinates" : [
-1.72037558286377,
41.7765828387632
],
"type" : "Point"
},
"room_type" : "entire_home",
"requires_license" : true,
"date" : {
"found" : ISODate("2017-08-14T02:12:39.360Z"),
"revised" : ISODate("2017-09-02T19:18:07.305Z")
},
"min_nights" : 1,
"license" : null,
"reviews" : 62,
"name" : "Loft rural",
"country_code" : "ES",
"user" : {
"url" : "/users/show/21923241",
"img" : "https://a0.muscache.com/im/pictures/1222ed23-2d99-49ac-88f9-401276cbe750.jpg?aki_policy=profile_x_medium",
"id" : "airbnb21923241",
"name" : "Ramón"
},
"beds" : 1
}
_id
: String, required.
url
: String, required.
user_id
: String, required.
curr
: String, required.
price
: Int, required.
price_usd
: Int, required.
reviews
: Int, required.
lnglat
: Geopoint, required. type
must be "Point", and coordinates
are [longitude, latitude] as float type.
license
: String, required.
date_ins
: ISODate, optional. If you doesnt provide one, it will be filled with current datetime (server UTC)
date_rev
: ISODate, autogenerated.
rate
: Int, required.
capacity
: Int, required.
min_nights
: Int, required.
url
: String, required.
rooms
: Int, required.
beds
: Int, required.
bathrooms
: Int, required.
room_type
: String, required.
author
: String, required.