Skip to content

Category: Threads

Andy Mac edited this page Apr 28, 2018 · 1 revision

getThread

Returns a conversation with a guest or host. This is a legacy endpoint which is somewhat limited in the content (only basic messages are reported in the 'posts' array)

airbnb.getThread({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 909878797
})
// returns a single thread in the legacy format (JSON)

getThreads

A simple list of thread ID's, ordered by latest update. The offset is how many to skip, and the limit is how many to report.

airbnb.getThreads({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    offset: 0,
    limit: 20
})
// returns an array of thread IDS (only the ids, ordered by latest update) (JSON)

getThreadsFull

This is the best way to pull thread data. Returns an array of full thread data, ordered by latest update. The offset is how many to skip, and the limit is how many to report.

airbnb.getThreadsFull({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    offset: 0,
    limit: 10
})
// returns an array of threads in the new format, ordered by latest update (JSON)

getThreadsBatch

A batch version of the above. You can grab a collection of threads referenced by thread ID.

airbnb.getThreadsBatch({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    ids: [23049848, 203495875, 398328244]
})
// returns an array of threads in the new format (JSON)