I'm building a web app to help Airbnb hosts manage their listings. I want to be notified of new reservation instead of pinging Airbnb's servers every few minutes. Airbnb's API doesn't have a way to push data to a server so I thought maybe I could emulate a device and receive push notifications.
Is this possible to emulate a device and receive push notifications in nodejs?
Update
Looks like the iOS app registers for push notifications at the following address:
https://api.airbnb.com/v2/air_notification_devices
with the following data:
{
"app_version": "19.08",
"device_type": "iphone_gcm",
"device_id": "{{DEVICE_ID}}",
"token": "{{TOKEN}}",
"enabled": true
}
and with the following cookie:
SRVID=mofi-production-12ab3c456-7defg_172.21.128.38:32350
and returns:
{
"air_notification_device": {
"app_version": "19.08",
"created_at": "2019-03-01T16:27:13Z",
"device_id": "{{DEVICE_ID}}",
"device_type": "iphone_gcm",
"enabled": true,
"id":{{ID}},
"locale": "en",
"token": "{{DIFFERNT_TOKEN}}",
"updated_at": "2019-03-01T16:27:13Z",
"user_id": {{USER_ID}}
},
"metadata": {}
}