create project
This commit is contained in:
commit
7b8a0009ed
9 changed files with 200 additions and 0 deletions
40
readme.md
Normal file
40
readme.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# random-puppy [](https://travis-ci.org/dylang/random-puppy)
|
||||
|
||||
> Get a random puppy image url.
|
||||
|
||||
<img src="http://i.imgur.com/0zZ8m6B.jpg" width="300px">
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save random-puppy
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const randomPuppy = require('random-puppy');
|
||||
|
||||
randomPuppy()
|
||||
.then(url => {
|
||||
console.log(url);
|
||||
})
|
||||
|
||||
//=> 'http://imgur.com/IoI8uS5'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### randomPuppy()
|
||||
|
||||
Returns a random puppy image from http://imgur.com/ from https://www.reddit.com/r/puppy
|
||||
|
||||
### randomPuppy(subreddit)
|
||||
|
||||
Returns a random image from the selected subreddit. Warning: We cannot promise it will be a puppy.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Dylan Greene](https://github.com/dylang)
|
Loading…
Add table
Add a link
Reference in a new issue