shuwen-news-nodejs-sdk

0.0.1 • Public • Published

shuwen-news-nodejs-sdk

News SDK for Node.js

安装

$ npm install shuwen-news-nodejs-sdk --save

环境

Node.js >= 6.11.3

使用

初始化参数说明

  • accessKey:应用 accessKey;
  • secretKey:应用 secretKey;
  • endpoint:接口地址,默认为 http://api.xinwen.cn

调用示例

const Client = require('shuwen-news-nodejs-sdk');

const client = new Client({
  accessKey: '<accessKey>',
  secretKey: '<secretKey>',
  endpoint: '<endpoint>',
});

// => returns Promise
// client.getCategory(query, options);
client.getCategory();
// co/yield, async/await

接口文档

getCategory

获得新闻的分类

getAll

获得所有新闻

getImportant

获得重大新闻

getHot

获得热门新闻

search

搜索新闻

Readme

Keywords

Package Sidebar

Install

npm i shuwen-news-nodejs-sdk

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • tinyhill