tilburgsciencehub / music-to-scrape

A fictitious music streaming service with a real website and API so you can learn how to scrape!
https://music-to-scrape.org
3 stars 5 forks source link

First API Commit #8

Closed thierrylahaije closed 1 year ago

thierrylahaije commented 1 year ago

This commit contains the following changes:

To run the Fast API:

hannesdatta commented 1 year ago

I've checked this out! Great progress!!!

A few comments:

Some server errors below when trying to run http://127.0.0.1:8000/users?limit=10 or http://127.0.0.1:8000/users

  field required (type=value_error.missing)
response -> data -> 7 -> favorite_track
  field required (type=value_error.missing)
response -> data -> 8 -> user_info
  field required (type=value_error.missing)
response -> data -> 8 -> total_plays
  field required (type=value_error.missing)
response -> data -> 8 -> favorite_artist
  field required (type=value_error.missing)
response -> data -> 8 -> favorite_track
  field required (type=value_error.missing)
response -> data -> 9 -> user_info
  field required (type=value_error.missing)
response -> data -> 9 -> total_plays
  field required (type=value_error.missing)
response -> data -> 9 -> favorite_artist
  field required (type=value_error.missing)
response -> data -> 9 -> favorite_track
thierrylahaije commented 1 year ago
thierrylahaije commented 1 year ago

@hannesdatta some test endpoints so you can check the functionality:

User list endpoint: http://127.0.0.1:8000/users?limit=5&offset=5 User endpoint: http://127.0.0.1:8000/users/username?username=user3 Total plays endpoint: http://127.0.0.1:8000/users/totalplays?username=user20

hannesdatta commented 1 year ago

This is a good initial push. We can define the next steps in new issues and discuss when meeting next.