Project-Sonata / Artists

Sonata-Artist is used to store info about artists, gives ability to become an artist and more!
0 stars 0 forks source link

Implement functionality to become an artist #2

Closed justJavaProgrammer closed 1 year ago

justJavaProgrammer commented 1 year ago

Implement functionality to become an artist. This implementation does not use any music distributor and used to create artist by user himself.

Request:

Method - POST URI - /v1/artist/become-artist Required scopes for this endpoint:

Required headers:

202 ACCEPTED status must be returned Content type: application/json Body:

"type": "pending",
"tracking": {
  "url": "https://api.sonata.com/v1/artist/tracking/status"
}

If access token is expired, malformed or invalid then: 401 UNAUTHORIZED status must be returned Headers:

Processing details: Endpoint should create artist from user and send event to kafka with name - "ArtistRegistrationEvent" ArtistRegistrationEvent payload in json:

{
  "event_code": "artist_registration_event",
  "name": "Odeyalooo",
  "genres": [
        "Lofi", "Hip-Hop"
   ]
}

The artist must be saved to database. Basic database schema for artist:

justJavaProgrammer commented 1 year ago

Implemented in https://github.com/Project-Sonata/Artists/pull/3