phamtrisi / airapi Goto Github PK
View Code? Open in Web Editor NEWNode.js client library for accessing Airbnb's API
Home Page: http://phamtrisi.github.io/airapi
License: MIT License
Node.js client library for accessing Airbnb's API
Home Page: http://phamtrisi.github.io/airapi
License: MIT License
Hi,
Can I search a listing from a host with user_id + checkin + checkout ?
hi @phamtrisi
thanks for sharing this code! i have a quick question: you hard code an API key in here. how did you obtain that API key? i am planning to make a very large number of requests against that API, so I am worried that there might be a limit at some point? do you have any experience with such issues? thanks for your help.
!err && res.statusCode != 200 is not captured.
If it enters this situation, the program will hang.
I will submit a fix for that.
Maybe a stupid question, but I just can't figure out, how to get hosting (client) id..
Sometimes when trying to retrieve reviews, there's an a connection error.
This is solved if adding: 'Connection': 'keep-alive' in configs.js
I apologise, I know this is a bit rude. I thought I'd let @phamtrisi and others know about it. I'm only posting here because phamtrisi/airapi has been un-maintained for 2 years, and is the top search result.
Here's the link:
https://github.com/zxol/airbnbapi
It's got more of a focus on logged in endpoints and hosting. Hopefully someone can get some use out of it! Thank you!
When running an example from examples folder. I also have tried adding my credentials from airbnb and looked up for the issue.
Here is the full log:
undefined:1
<!DOCTYPE html>
^
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Request._callback (/Users/rostyslav/projects/airapi/api/search.js:52:22)
at Request.self.callback (/Users/rostyslav/projects/airapi/node_modules/request/request.js:368:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/Users/rostyslav/projects/airapi/node_modules/request/request.js:1219:14)
at emitOne (events.js:121:20)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/Users/rostyslav/projects/airapi/node_modules/request/request.js:1167:12)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
request
does not always have an err
object when res.status !== 200
Using getInfo.js
as an example:
request(requestConfigs, function(err, res, body) {
if (!err && res.statusCode == 200) {
resolve(JSON.parse(body));
} else if (err) {
reject(err);
}
});
When calling this method with a listing ID that does not exist Airbnb return status = 404
with the body = {error_code:404, error: 'record_not_fond' ...}
but err
object in null
.
Because of your "if else" statement neither resolve
or reject
is called... which is bad as this hangs and never returns.
Propose a change to something like:
request(requestConfigs, function(err, res, body) {
if (res.statusCode == 200) {
resolve(JSON.parse(body));
} else {
reject(JSON.parse(body));
}
});
Hello,
I have seen your great work and hope to contribute.
Can I know upcoming features and roadmap?
Thanks.
Search for apartments also can be done on a map.
"sw_lat" "sw_lng" "ne_lat" and "ne_lng" are the parameter names.
This is important as it allows to search for all apartements in a region: if many apartments are found for a region, then zoom in and search more in detail...
Hi!
I've found your awesome library. But I think it only works with node.js. But I want to integrate it with jQuery.
So, can you tell me how can I do that?
Thanks
Mobashir
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.