项目作者: zhanziyang

项目描述 :
Billboard music chart unofficial API in Node.js
高级语言: JavaScript
项目地址: git://github.com/zhanziyang/billboard-crawler.git
创建时间: 2018-05-17T04:27:26Z
项目社区:https://github.com/zhanziyang/billboard-crawler

开源协议:

下载


billboard-crawler

Billboard music chart unofficial API in Node.js

Install

  1. $ npm install billboard-crawler

Usage

new BillboardCrawler()

Constructor

  1. // import the npm module as a class constructor
  2. const BillboardCrawler = require('billboard-crawler')
  3. // new it up
  4. const billboard = new BillboardCrawler()

Methods

  1. billboard.getChart(chartName?, date?)
  • chartName: The chart name, e.g. 'Hot 100' or 'Pop Songs'. You can browse the Charts page on Billboard.com to find valid chart names; the URL of a chart will look like http://www.billboard.com/charts/CHART-NAME (example). By default 'Hot 100' chart is fetched.
  • date: The chart date as a string, in YYYY-MM-DD format. By default, the latest chart is fetched.
  1. billboard.getYearEndChart(chartName?, year?)
  • chartName: The chart name, e.g. 'Hot 100 Songs' or 'Top Artists'. You can browse the Charts page https://www.billboard.com/charts/year-end. By default 'Hot 100 Songs' chart is fetched.
  • year: For example 2008. By default, last year’s year-end chart is fetched.
  1. billboard.getArtistChartHistory(artist, chartName?)
  • artist: Arist’s name, e.g. 'Rihanna' or 'Taylor Swift'.
  • chartName: Same as the chartName argument in getChart method.