Skip to content

willian2s/web-service-gin

Repository files navigation

Album Service

The Album Service is a web service that allows users to create and search for albums.

Prerequisites

Optional

Installation

  1. Clone the repository:
  git clone https://github.com/willian2s/web-service-gin.git
  1. Install the dependencies:
  go mod download
  1. Start the development server:
  air

or

  go run .

Usage

List all albums

To list all albums, send a GET request to the /albums endpoint:

  curl http://localhost:8080/albums
  {
    "id": "b3997ac1-c367-40e3-8327-223ef777355c",
    "title": "Blue Train",
    "artist": "John Coltrane",
    "price": 56.99
  },
  {
    "id": "60831261-8bd1-4fb3-9df7-99f75a003caf",
    "title": "Jeru",
    "artist": "Gerry Mulligan",
    "price": 17.99
  },

Create an Album

To create an album, send a POST request to the /albums endpoint:

  curl http://localhost:8080/albums \
    --include \
    --header "Content-Type: application/json" \
    --request "POST" \
    --data '{"title": "The Modern Sound of Betty Carter","artist": "Betty Carter","price": 49.99}'

Contributing

Contributions are welcome! Please follow the contribution guidelines.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages