Skip to content

📪 A simple API to obtain Wikipedia Picture of the Day!

License

Notifications You must be signed in to change notification settings

CodeDotJS/wikipics-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wikipics-api Build Status

A simple API to obtain Wikipedia Picture of the Day

Install

$ npm install --save wikipics-api

Usage

'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 : Download Wikipedia Picture of the Day and more!

License

MIT © Rishi Giri

About

📪 A simple API to obtain Wikipedia Picture of the Day!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published