Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codedotjs/wikipics-api
:mailbox_closed: A simple API to obtain Wikipedia Picture of the Day!
https://github.com/codedotjs/wikipics-api
api day picture wiki wikipedia wikipedia-picture
Last synced: 24 days ago
JSON representation
:mailbox_closed: A simple API to obtain Wikipedia Picture of the Day!
- Host: GitHub
- URL: https://github.com/codedotjs/wikipics-api
- Owner: CodeDotJS
- License: mit
- Created: 2017-07-29T02:29:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T19:39:33.000Z (over 7 years ago)
- Last Synced: 2024-12-08T01:04:55.437Z (about 1 month ago)
- Topics: api, day, picture, wiki, wikipedia, wikipedia-picture
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# wikipics-api [![Build Status](https://travis-ci.org/CodeDotJS/wikipics-api.svg?branch=master)](https://travis-ci.org/CodeDotJS/wikipics-api)
> A simple API to obtain Wikipedia Picture of the Day
## Install
```
$ npm install --save wikipics-api
```## Usage
```js
'use strict'const wikipics = require('wikipics-api');
wikipics().then(data => {
console.log(data);
/*
{
image: 'https://upload.wikimedia.org/.../20px-Padlock-pink.svg.png',
name: '20px-Padlock-pink.svg.png',
data: 'Centaurea jacea\nPhotograph: Uoaei1\nArchive – More featured pictures...'
}
*/
});wikipics('2014-10-10').then(data => {
console.log(data);
/*
{
image: 'https://upload.wikimedia.....450px-Soursop%2C_Annona_muricata.jpg',
name: '450px-Soursop%2C_Annona_muricata.jpg',
data: 'The soursop is the fruit of ...with sour citrus flavour...'
}
*/
});
```## API
#### `wikipics()`
- `Return promise for current picture of the day`
#### `wikipics('date')`
- `Returns promise for picture of the day of specific date`
`date`
`TYPE` `:` `string`
`FORMAT` `:` `yyyy-mm-dd`
## Related
- __[`wikipics`](https://github.com/CodeDotJS/wikipics)__ : `Download Wikipedia Picture of the Day and more!`
## License
MIT © [Rishi Giri](http://rishigiri.ml)