Ruby gem to retrieve top 100 songs from Billboard's "The Hot 100"
gem install billboard-top-100
require 'billboard-top-100'
billboard = BillboardTop100.new()
# date format YYYY-MM-DD (defaults to saturday of current week)
tracks = billboard.getTop100("2016-11-12")
tracks.each do |track|
puts track.title.to_s
puts track.artist.to_s
puts track.rank.to_s
puts track.cover.to_s
puts "\n"
end
Type: array
Track objects.
Type: number
Rank of song on charts.
Type: string
Title of song.
Type: string
Name of artist of song.
Type: object
Cover image URL of song.
MIT © Rishi Masand