stackexchange-node:用于StackExchange API + Node.js的NPM模块

  • U4_166344
    了解作者
  • 11.2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-29 22:29
    上传日期
stackexchange节点 用于StackExchange API + Node.js的NPM模块(有效维护的版本!) 安装 npm i --save stackexchange-node 用法 var stackexchange = require ( 'stackexchange-node' ) ; var apiOptions = { version : 2.2 } ; var api = new stackexchange ( apiOptions ) ; var filter = { key : 'YOUR_API_KEY' , pagesize : 50 , tagged : 'node.js' , sort : 'activity' , order : 'asc' } ; // Get all the questions (http://api.s
stackexchange-node-master.zip
  • stackexchange-node-master
  • lib
  • methods
  • answers.js
    1.9KB
  • questions.js
    2.3KB
  • search.js
    650B
  • tags.js
    6.4KB
  • users.js
    1.1KB
  • config.js
    262B
  • parser.js
    564B
  • stackexchange-node.js
    792B
  • query.js
    1.1KB
  • post.js
    1.1KB
  • test
  • config-test.js
    689B
  • tags-test.js
    5.7KB
  • common.js
    218B
  • mocha.opts
    48B
  • README.md
    640B
  • .gitignore
    884B
  • package.json
    886B
内容介绍
# stackexchange-node NPM module for StackExchange API + Node.js (actively maintained version!) Installation ---- ``` npm i --save stackexchange-node ``` Usage ---- ```js var stackexchange = require('stackexchange-node'); var apiOptions = { version: 2.2 }; var api = new stackexchange(apiOptions); var filter = { key: 'YOUR_API_KEY', pagesize: 50, tagged: 'node.js', sort: 'activity', order: 'asc' }; // Get all the questions (http://api.stackexchange.com/docs/questions) api.questions.questions(filter, function(err, results){ if (err) throw err; console.log(results.items); console.log(results.has_more); }); ```
评论
    相关推荐