drawrowfly / airbnb-private-api

Unofficial AirBnb Private API Wrapper
51 stars 13 forks source link

FS issues with React #7

Closed atawfique21 closed 4 years ago

atawfique21 commented 4 years ago

Hi there,

Great API and documentation. I understand that this library is primarily used for Node applications. However, I am trying to integrate this into a React front-end and run the API calls inside of the React application.

I discovered that FS is not usable through the browser and instead replaced this with browserify-fs in the SessionManager.js file. Then, I discovered that browserify-fs does not have the following properties: fs_1.constants.W_OK | fs_1.constants.R_OK and the React app will error out.

I wanted to see if there was an easier way to integrate this API with React before editing the source code further and Frankenstein-ing it to work with React.

Thank you.

drawrowfly commented 4 years ago

Hello,

Well, you won't be able to run i from the browser side, you can only run it with the NodeJS!

Best approach here is to build Rest API