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
artists = billboard.getArtist100("2016-11-12")
artists.each do |artist|
puts artist.name.to_s
puts artist.rank.to_s
puts artist.image.to_s
puts "\n"
end
albums = billboard.getBillboard200("2016-11-12")
albums.each do |album|
puts album.title.to_s
puts album.artist.to_s
puts album.rank.to_s
puts album.image.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.
Type: array
Artist objects.
Type: number
Rank of artist on charts.
Type: string
Name of artist.
Type: object
Image URL of artist.
Type: string
Title of album.
Type: string
Name of artist.
Type: number
Rank of album on charts.
Type: object
Image URL of album.
MIT © Rishi Masand