Skip to content

Terminal-based C++ application using Last.fm API

License

Notifications You must be signed in to change notification settings

kiteniszhat/Cpp-FM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

░█████╗░░░░░░░░░░░░░░░███████╗███╗░░░███╗ ██╔══██╗░░██╗░░░░██╗░░██╔════╝████╗░████║ ██║░░╚═╝██████╗██████╗█████╗░░██╔████╔██║ ██║░░██╗╚═██╔═╝╚═██╔═╝██╔══╝░░██║╚██╔╝██║ ╚█████╔╝░░╚═╝░░░░╚═╝░░██║░░░░░██║░╚═╝░██║ ░╚════╝░░░░░░░░░░░░░░░╚═╝░░░░░╚═╝░░░░░╚═╝

Terminal-based C++ application utilizing the nlohmann json library for parsing JSON data and the httplib library for making HTTP requests. It fetches data from the Last.fm API, such as top tracks, artists, or albums, based on user input. Users can interact with the application through the command line interface, receiving relevant information from Last.fm directly within their terminal window.

Status

🚧 Work in Progress ⚠️

Table of Contents

  1. How it works
  2. Example Input/Output
  3. Libraries Used
  4. License
  5. Repository Guide

How It Works

  1. The user is prompted by the application to input the name of a track, artist, album, or Last.fm user to retrieve data for.
  2. Using the provided user data and API key, the application sends an HTTP request to the Last.fm API.
  3. The API responds with data in JSON format.
  4. The application parses the JSON response to extract the relevant information.
  5. The extracted details about the track, artist, album, or user are then displayed within the terminal-based interface.

Example Input/Output

Input

Enter artist name: The Doors

Output

Top albums of The Doors:
  1. The Doors
  2. Greatest Hits
  3. L.A. Woman

Top tracks of The Doors:
  1. Break on Through (to the Other Side)
  2. People Are Strange
  3. Light My Fire
  4. Riders on the Storm
  5. Roadhouse Blues

Genres of The Doors:
  1. classic rock
  2. Psychedelic Rock
  3. rock

The Doors description from Last.fm:
[...]

Libraries Used

  • nlohmann's JSON: A library for parsing JSON data
  • httplib: A library for making HTTP requests and retrieving data from APIs

License

This project is licensed under the MIT License.

Repository Guide

├── README.md        # this README
├── LICENSE          # license file
├── CMakeLists.txt   # CMake file that contains instructions for configuring the build
├── src
│   ├── Album.cpp    # album class
│   ├── Album.h
│   ├── AlbumFunctions.h
│   ├── Artist.cpp   # artist class
│   ├── Artist.h
│   ├── ArtistFunctions.h
│   ├── Menu.h       # file that makes app look cool in Terminal ;D
│   ├── Playlist.h   # header with making playlist functionality
│   ├── Track.cpp    # track class
│   ├── Track.h
│   ├── TrackFunctions.h
│   ├── User.cpp     # user class
│   ├── User.h
│   ├── UserFunctions.h
│   └── main.cpp

About

Terminal-based C++ application using Last.fm API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published