@katalonne/billboard-top-100

1.0.1 • Public • Published

Billboard Top 100

Build Status codebeat badge GitHub open issues npm version MIT License

Promise and Callback based module API for getting Billboard chart list For browser and node.js

Installation

yarn add @katalonne/billboard-top-100

npm install --save @katalonne/billboard-top-100

Usage

import getChart from 'billboard-top-100';

// or

const getChart = require('billboard-top-100')

// With Promise
getChart('hot-100').then(chart => {
  console.log(chart)
}).catch(e => {
  console.error(e)
})

// or 

// With a callback
getChart('hot-100', (err, chart) => {
  if (err !== null) {
    console.error(err)
  }

  console.log(chart)
})

getChart([chartName], [week], [callback])

Param Type Default Description
[chartName] string 'hot-100' Billboard chart name. ('hot-100' or 'billboard-200')
[week] string current week chart week. YYYY-MM-DD (Example: '2019-06-01')
[callback] Function (err, chart) => { ... }

All parameters are optional, therefore you can pass just the callback.

License

MIT © katalonne

/@katalonne/billboard-top-100/

    Package Sidebar

    Install

    npm i @katalonne/billboard-top-100

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    695 kB

    Total Files

    10

    Last publish

    Collaborators

    • katalonne