Code Monkey home page Code Monkey logo

ajax-exercices's Introduction

AJAX-music-search

Overview

The learning objective for the exercise is to make use of AJAX (asynchronous javascript) to fetch- and display data and you'll create a simple youtube clone with data from this API.

Objectives

There's two main user stories to this app:

  • A user can search for artists by name and they are displayed as a list so the user can see the search result
  • A user can click a search result item and it displays a list of related youtube videos for the user to watch/listen

Search with autocomplete

Create a search field that allows the users to search for artist. The user will see autocomplete suggestions based on his input.

  • Have a look at the API and look for the autocomplete method.
  • Use the user input to fetch the autocomplete options. Try to log the results to your console when the user presses enter in the input field.
  • Next, display the fetched data in a clickable list under the search field

search-feature

Select Artist

Upon selecting an artist out of the suggestion list, display a list of videos from the selected artist

  • Find the correct method to fetch the songs of a selected artist in the API.
  • Try to log the data of the selected artist to the console.
  • Dynamically create the list of videos

search-feature

Online example

Example using fetch

How to get started

Start with the provided boilerplate. The boilerplate has a JS folder which contains a script.js that has pre-made functions for the foundations of the project and guiding you in the right direction. And also a css folder with some basic styling to get you started.

Completion checklist

  • Create an autocomplete search with your AJAX knowledge
  • Display the autocomplete options in a clickable list
  • Allow the user to select an artist
  • Fetch and display the available youtube videos for the selected artist
  • Optional: using the YouTube player API display the lyrics of the song that is playing

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.