Giter Site home page Giter Site logo

matdweb / albumsearcher-experimental Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 107 KB

A experimental ๐Ÿงช code to generate an access token ๐Ÿ“‹ to consume the Spotify API ๐ŸŽง and show all of the albums ๐Ÿ’ฝ based on a artist ๐ŸŽ™๏ธ search

JavaScript 94.01% HTML 5.27% CSS 0.72%

albumsearcher-experimental's Introduction

Album Searcher experimental ๐Ÿงช

This is a React application developed using vite.js. This app uses the Spotify API to make requests and finally retrieving the group of albums composed by a certain artist which is based on user's searching queries

This is an experimental code. The purpose of this project is to test functionality for the development of a greater application See here the main application: Jamming;

Getting Started

First, run the development server:

npm run dev

Open http://localhost:5173 with your browser to see the result.

You can start editing the page by modifying src/App.jsx.

API's management in this project

APIs on this project can be accessed on src/api/spotify. This folder stores all of the API calls and information handling and returning occur here. The app logic behind this API calls works like this:

  1. First make a request to the Spotify API retrieving the access token to be able to perform the rest of the requests. The token then is returned. Learn more about access token here
  2. Second it makes the call to the getArtistId() which will utilize the previous token and the input the user entered.
  3. This function makes a request to the Spotify API get artists and adds the search queries. This alongside the token added as part of the request must return an array of artists. Since the request bases on the user input it brings the firsts artists that matches this input.
  4. Now the id from the first element [0] of the array is taken an returned
  5. Afterwards, we need to retrieve the albums from this artist. So based on the previous artist_id, using the Spotify API get artist's album you are retrieving the albums associate to this artist. Remember that you must also add the token to this as part of the request
  6. Then, the group of albums (JSON) is returned

Learn More

To learn more about vite.js, take a look at the following resources:

You can check out the Vite GitHub repository

Deploy on Netlify

Run the build command:

npm run build

One of the easiest way to deploy your vite.js app is to use the Netlify platform

Check out the vite.js deployment documentation for more details. And you can check here the netlify guide to deploy the application.

albumsearcher-experimental's People

Contributors

matdweb avatar

Watchers

Kostas Georgiou avatar  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.