Getting Started with Fastify-CLI
This project was bootstrapped with Fastify-CLI.
In the project directory, you can run:
To start the app in dev mode.
Open http://localhost:3000 to view it in the browser.
For production mode
Run the test cases.
To learn Fastify, check out the Fastify documentation.
The #1 app for Taylor Swifties!
SwiftCloud is a web application that provides a comprehensive database of Taylor Swift's songs, along with play counts for a user in the past 3 months.
Retrieve a list of all songs.
Example Response:
[
{
"id": 1,
"title": "Song 1",
"artist": "Artist 1",
"year": 2020
},
{
"id": 2,
"title": "Song 2",
"artist": "Artist 2",
"year": 2019
}
]
Retrieve a list of songs from a specific year.
Example Request: GET /v1/songs/2020
Example Response:
[
{
"id": 1,
"title": "Song 1",
"artist": "Artist 1",
"year": 2020
}
]
Retrieve a list of popular songs from a specific period (e.g. "june", "july", "august", "all").
Example Request:GET /v1/songs/popular/august
Example Response:
[
{
"id": 1,
"title": "Song 1",
"artist": "Artist 1",
"year": 2020
}
]
Search for songs based on a criteria (e.g. title, artist, writer and album).
Example Request: GET /v1/songs/search?q=The 1
Example Response:
[
{
"id": 1,
"title": "Song 1",
"artist": "Artist 1",
"year": 2020
}
]
Retrieve a list of songs sorted by a specific column (e.g. title, artist, writer, album).
Example Request: GET GET /v1/songs/sort?sortBy=title&sortOrder=asc
Example Response:
[
{
"id": 1,
"title": "Song 1",
"artist": "Artist 1",
"year": 2020
},
{
"id": 2,
"title": "Song 2",
"artist": "Artist 2",
"year": 2019
}
]