LIHKG API client for node.js
npm install lihkg-api-nodejs-client --save
const lihkg = require('lihkg-api-nodejs-client');
lihkg.getLatestBlowWater().then(result => {
// threads from 吹水台
}).catch(error => {
// handle error
});
- .getLatestBlowWater([page, count]) ⇒
Promise
- .getLatestHot([page, count]) ⇒
Promise
- .getLatestNew([page, count]) ⇒
Promise
- .getChannel(category, [page, count]) ⇒
Promise
- .getThread(threadID, [page, count]) ⇒
Promise
- .search(query, [page, count]) ⇒
Promise
Use this method to get the latest threads in 吹水台.
Param | Type | Description |
---|---|---|
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to get the latest hot threads.
Param | Type | Description |
---|---|---|
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to get the latest new threads.
Param | Type | Description |
---|---|---|
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to get the threads in a category(channel).
Param | Type | Description |
---|---|---|
category | Number |
Refer to Categories |
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to get a thread for the unique ID.
Param | Type | Description |
---|---|---|
threadID | Number |
Thread id returned from the threads list |
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to search threads contain the query in the title.
Param | Type | Description |
---|---|---|
query | String |
query string |
[page] | Number |
default: 1 |
[count] | Number |
default: 30 |
Use this method to login. User ID and token is cached for further authentication.
Param | Type | Description |
---|---|---|
String |
username | |
password | String |
password |
- 連尼住
- HKG+
- 望遠
- https://na.cx
- colloquet
lihkg-api-nodejs-client
is available under the MIT license. See the LICENSE file for more info.