darthbatman / billboard-top-100

:chart_with_upwards_trend: Node.js API to retrieve the top songs, albums, and artists from Billboard's charts
MIT License
97 stars 30 forks source link

Feature addition #19

Closed ReverseControl closed 5 years ago

ReverseControl commented 5 years ago

Hi, first thank you for making this. It is incredibly useful. Could you add the year in addition to the cover, group, title and rank?

How difficult would it to implement a function to ask for the top-100 of a given year, month or week?

darthbatman commented 5 years ago

As per the README, it is already possible to get the hot-100 list of a given week:

// date format YYYY-MM-DD

getChart('hot-100', '2016-08-27', function(err, songs) {
    if (err) console.log(err);
    console.log(songs); //prints array of top 100 songs for week of August 27, 2016
    console.log(songs[3]); //prints song with rank: 4 for week of August 27, 2016
    console.log(songs[0].title); //prints title of top song for week of August 27, 2016
    console.log(songs[0].artist); //prints artist of top songs for week of August 27, 2016
    console.log(songs[0].rank) //prints rank of top song (1) for week of August 27, 2016
    console.log(songs[0].cover) //prints URL for Billboard cover image of top song for week of August 27, 2016
});

This issue has been marked as an enhancement if another contributor would like to add the functionality for a given year or month.

JasonLaw1994 commented 5 years ago

This issue has been marked as an enhancement if another contributor would like to add the functionality for a given year or month.

@darthbatman Do you mean getting the hot-100 list of a given year or month?

bodzio166 commented 5 years ago

Hello!

Is there a way to get a chart positions of a specific album on billboard charts, like

https://github.com/w74/billboard-api-php

JasonLaw1994 commented 5 years ago

@bodzio166 I'm a little confused, what do you want to do?

bodzio166 commented 5 years ago

Sure, let me explain: I am trying to get a charts position history for a specific album, for example "Thriller" by MJ. You get chart positions week by week when it was on billboards charts. After you can print out a graph out of it. This API had something like that, but is now dead...

JasonLaw1994 commented 5 years ago

I don't think you can do it using pure billboard-top-100.js, but you can get the charts from startWeek to endWeek, and then do what you want to do with the data. And maybe here is not a good place to talk about something that's not related to the issue.

darthbatman commented 5 years ago

This has been inactive for a few months now, so I will be closing this issue. Please feel free to reopen.