GithubHelp home page GithubHelp logo

mhmdabdilahpour / bnbhostapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidplappert/bnbhostapi

0.0 0.0 0.0 16 KB

AirBnb API for hosts

Home Page: https://www.airbnb.com/rooms/18412320

License: MIT License

JavaScript 100.00%

bnbhostapi's Introduction

bnbhostapi

I, David Plappert, am an Airbnb Superhost. I, also, want to be able to build tools to support my business, the way I want. Currently, I pay about $40 per month for tools that only do some of what I want. SmartBnb, Properly, QuickBooks, and others are a good start. However, I want more control, customization and automation.

This wrapper exposes API end points that allow you to:

  • login to Airbnb and get an oauth token (this has to be frist before you do anything else)
  • Get listings
  • Get listing details
  • Get messages
  • Get message details
  • Send messages
  • Get calendar for a listing
  • Update calendar for a listing (change prices, availbility, notes)
  • get Payouts (used to get a list of reservations, past and future - also gives you exact $ for accounting)
  • get reservation details
  • get user details (info about your guests)

To set this API up, follow these steps:

I assume you have node installed (nvm maybe?) and that you have a listing on AirBnb.

  1. npm install bnbhostapi (or git clone [email protected]:davidplappert/bnbhostapi.git && npm install)
  2. export bnbhostapi_username='xxxxxxx' (replace with your email)
  3. export bnbhostapi_password='xxxxxxx' (replace with your password)
  4. node examples/login.js (this generates a oauth token we need for the rest of the api calls)
  5. export bnbhostapi_oauthtoken = xxxxxx (output from the above script)
  6. node examples/getPayouts.js (to make sure your setup is correct).

This following sippet will return all your payout info along with all the reservation info.

var bnbhostapi = require('bnbhostapi');
bnbhostapi.getPayouts(true).
each(function(payout){
  bnbhostapi.getReservation(payout['reservation']['confirmation_code'])
  .then(function(reservation){
    console.log(reservation);
  });
});

Forward looking features:

  • leave reviews
  • charge for extra services
  • stats and more details for reporting

Credits:

bnbhostapi's People

Contributors

davidplappert avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.