Coder Social home page Coder Social logo

yousefemadi / billboard_music_rest_api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.11 MB

This web application works based on web services (REST APIs) powered by Billboard.com and YouTube.com. Designed and developed by ZOE group using REST API, JSON, JavaScript, CSS, Bootstrap, HTML5 and caching API responses on the Local Storage.

Home Page: https://zoe-top-songs-chart.netlify.app/

HTML 1.91% CSS 36.02% JavaScript 62.07%
rest-api json bootstrap javascript css html5 localstorage

billboard_music_rest_api's Introduction

Billboard_Music_REST_API

##This web application works based on web services (REST APIs) powered by Billboard.com and YouTube.com.
##Designed and developed by ZOE group using REST API, JSON, JavaScript, CSS, Bootstrap, HTML5 and caching API responses on the Local Storage.

##Team members: #Jerome Olivier #Yousef Emadi #Anthony Zampino

2022-03-27 22-40-35_1_1

https://www.youtube.com/watch?v=V24AaQRT6LQ


Billboard API: We used the “Hot 100” chart to get the list of top songs for a given week
YouTube Search Results API: We used the “Hot 100” chart to get the list of top songs for a given week
The end result was to produce a Top 10 songs list with a link to the YouTube video of each song

Finding a suitable API for our project was one of the challenges we faced. Our original idea was to use APIs to fetch different types of flight data (airlines, airports, aviation weather reports etc.) but the APIs were slow and/or unreliable. Although paid versions could have been more responsive, the time required to receive a key was too long.

The Billboard API search query only works if the date used falls on a Saturday. However, the app allows a user to choose any date when requesting the top 10 songs. A function was created to revert any chosen date to the previous Saturday (findNearestSaturday)

The differences in the response times for the two APIs would cause certain results to show up as undefined and running the “fetch” command again would resolve it. Not to have to hit “fetch” twice to produce results, we used async functions with the “await” and “.then” keywords

To get the desired result, the YouTube API needed the information from the Billboard API (Song title and Artist). A function was created to automatically create the search string based on the Billboard API results (generateSearchQueries).

To avoid having to use a new API request every time the user wants to see a top 10 list, we took advantage of “local storage” to save the JSON results. This way when a user requests the top 10 list from a date they had already previously selected, the app fetches the info from local storage rather then from another API request. This produces faster results

For testing purposes, the free version of the APIs were not sufficient in term of maximum daily requests, so we paid for a basic package giving us 1500 Billboard request and 10,000 YouTube requests daily.

Each new request takes approximately 10 to 12 seconds to produce results

billboard_music_rest_api's People

Contributors

yousefemadi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.