stack-exchange-markdown-retriever
Version:
Retrieves the markdown for a question or answer on a stack exchange site.
59 lines (40 loc) • 2.5 kB
Markdown
# stack-exchange-markdown-retriever
[](https://nodei.co/npm/stack-exchange-markdown-retriever/)


[](https://travis-ci.org/m4bwav/stack-exchange-markdown-retriever)
[](https://david-dm.org/m4bwav/stack-exchange-markdown-retriever)
[](https://coveralls.io/github/m4bwav/stack-exchange-markdown-retriever?branch=master)
[](https://snyk.io/test/npm/stack-exchange-markdown-retriever)
[](https://github.com/sindresorhus/xo)
[](https://gitter.im/m4bwav/stack-exchange-markdown-retriever?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Retrieves the markdown for a question or answer on a stack exchange site.
## Installation
Installation is easiest through npm:
`npm install stack-exchange-markdown-retriever --save`
## Usage
**stack-exchange-markdown-retriever** can be included as a reference.
```
var stackExchangeMarkdownRetriever = require('stack-exchange-markdown-retriever');
var options = {
site: 'scifi.stackexchange.com',
entityId: 127968
};
stackExchangeMarkdownRetriever.retrieveMarkdown(options, function(markdown){
console.log(markdown);
});
```
## CLI
```
$ npm install --global stack-exchange-markdown-retriever
```
```
$ stack-exchange-markdown-retriever --help
Usage
$ stack-exchange-markdown-retriever [-k <key>] [-a] -s "<site>" <id>
Example
$ stack-exchange-markdown-retriever -s "scifi.stackexchange.com" 127968
```
## License
MIT © [Mark Rogers](http://www.markdavidrogers.com)
[](https://nodei.co/npm/stack-exchange-markdown-retriever/)