Skip to content

Schema/API Design comments (Robin Tun) #38

@robintun

Description

@robintun

Properly Formatted here: https://docs.google.com/document/d/1cVCBWqQH7n8HQwecNEdxX0xvkgp-FDhT6DsJs-Gj_sU/edit?usp=sharing

  1. Instead of returning an automatically generated user_id: int when creating a new user, a username input and a username output might be more helpful and easy for the user to remember when creating a new user.
  2. The artist field in the API Spec is given as a string, but in the ER diagram, it shows the artist as an int.
  3. There are fewer tables (no playlist_songs and users_playlist_position table) in the ER diagram compared to what is shown in the schema.sql file. Is there a reason for this?
  4. I see no search capability, so it would be nice to implement it in your future version as it will allow users to conveniently search for songs/playlists.
  5. How would you handle the case when a song is already in the playlist but the user is trying to add it? I don’t see any condition checks to see whether a song is already in the playlist or not.
  6. Having a way to view all playlists that are available to view (like the get_catalog method in our potions shop) and listen would be a nice feature for your service.
  7. In the Song table of the ER diagram, it has an attribute isrc_number: int, which doesn’t appear in the songs table of the schema.sql file. What is the isrc_number supposed to do or what does it represent?
  8. It might be better to limit users to choose only from approved streaming platforms. This way users cannot type in a random string or carelessly misspell the platform.
  9. There could be an additional field when creating a playlist if you want to add the feature of allowing users to specify whether they want the playlist to be public or private.
  10. I suggest precisely specifying error responses for various situations, incorporating informative messages alongside suitable HTTP status codes.
  11. There is a discrepancy between the Set Preferred Platform outlined in the API Spec and the actual code implementation in users.py.
  • The set_platform endpoint is seeking three additional attributes (album: str, artist: str, link: str) that are not documented in the API Spec.
  1. When a delete user action is going to be performed, I suggest implementing various user authentication mechanisms to be sure before proceeding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions